:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c63ff;
    --accent-color: #2ecc71;
    --text-color: #333;
    --light-text: #6c757d;
    --bg-color: #ffffff;
    --card-bg: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #6c8aff;
    --secondary-color: #8b85ff;
    --accent-color: #4bcf82;
    --text-color: #e9ecef;
    --light-text: #adb5bd;
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --border-color: #2d3561;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    width: 28px;
    height: 28px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--card-bg);
}

/* Hero Section */
.hero {
    padding: 50px 0;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.hero p {
    font-size: 1.1rem;
    color: var(--light-text);
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(74, 108, 247, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

/* Projects Section */
.projects {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-color);
}

.card p {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* Gamification Elements */
.gamification-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.2);
}

.gamification-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0;
    transition: width 1.5s ease;
}

.achievement-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: 10;
}

.achievement-badge.show {
    transform: scale(1);
}

.achievement-badge svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.xp-points {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.xp-points span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Contact Section */
.contact {
    padding: 50px 0;
    text-align: center;
    background-color: var(--card-bg);
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.contact p {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 20px;
}

.contact a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.contact a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
}

.social-icon:hover svg {
    fill: white;
}

.social-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--text-color);
    transition: var(--transition);
}

.copyright {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Features Section */
.features-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
}

.features-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.05rem;
    color: var(--light-text);
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.feature-item {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.feature-item h3 {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.feature-item p {
    color: var(--light-text);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* FAQ Section */
.faq-section-main {
    padding: 60px 0;
    background-color: var(--bg-color);
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.faq-item summary {
    padding: 18px 20px;
    background: var(--card-bg);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    user-select: none;
    transition: var(--transition);
    font-size: 1.05rem;
}

.faq-item summary:hover {
    background: var(--border-color);
}

.faq-item[open] summary {
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    color: white;
}

.faq-item p {
    padding: 18px 20px;
    color: var(--light-text);
    line-height: 1.7;
    margin: 0;
}

/* Contact Section */
.contact {
    padding: 60px 0;
    text-align: center;
    background-color: var(--card-bg);
}

.contact h2 {
    margin-bottom: 20px;
}

.contact p {
    color: var(--light-text);
    margin-bottom: 15px;
}

.contact a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact a:hover {
    text-decoration: underline;
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .project-cards {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .nav-links a:not(.theme-toggle) {
        font-size: 0.9rem;
    }
}

/* New Tool Card - RetroGif */
.new-tool-card {
    position: relative;
    animation: gentleGlow 3s ease-in-out infinite;
    border: 2px solid transparent;
    background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
                linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #667eea 100%) border-box;
}

@keyframes gentleGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3),
                    0 0 40px rgba(118, 75, 162, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.5),
                    0 0 60px rgba(118, 75, 162, 0.3),
                    0 0 80px rgba(240, 147, 251, 0.2);
    }
}

.new-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    z-index: 10;
    animation: newBadgePulse 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

@keyframes newBadgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.shine-effect {
    position: relative;
    animation: shine 2.5s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9))
                drop-shadow(0 0 25px rgba(255, 215, 0, 0.6));
    }
}

.sparkle-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: iconRotate 6s linear infinite;
}

@keyframes iconRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

.btn-new {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.btn-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-new:hover::before {
    left: 100%;
}

.xp-new {
    animation: xpBounce 1s ease-in-out infinite;
}

@keyframes xpBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}