:root {
    /* Modern color palette */
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --accent-color: #ff6b6b;
    --background-color: #f8f9fa;
    --text-color: #2d3436;
    --dark-bg: #1a1a1a;
    --dark-text: #ffffff;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --gradient-primary: linear-gradient(135deg, #4a90e2 0%, #50c878 100%);
    --gradient-secondary: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* Dark theme variables */
[data-theme="dark"] {
    --background-color: var(--dark-bg);
    --text-color: var(--dark-text);
    --box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    animation: wave 10s linear infinite;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s backwards;
}

/* Game Container */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

/* Game Screens */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
}

.stat i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Challenge Container */
.challenge-container {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.challenge-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

#user-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: var(--transition);
    background: white;
    resize: none;
}

#user-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Progress Bar */
.progress-container {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0;
    transition: width 0.3s ease;
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    background: var(--background-color);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials {
    padding: 4rem 2rem;
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.testimonials-carousel {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0 1rem;
}

.testimonial-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.stars {
    color: #ffd700;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.newsletter-form button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buttons */
.cta-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.share-button {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 1rem;
}

.share-button:hover {
    background: var(--primary-color);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wave {
    0% { transform: translateX(0); }
    50% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-content {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .testimonial-card {
        flex-direction: column;
        text-align: center;
    }

    .container {
        margin: 1rem;
        padding: 1rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* Difficulty Buttons */
.difficulty-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.difficulty-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.difficulty-btn[data-difficulty="easy"] {
    background: var(--success-color);
    color: white;
}

.difficulty-btn[data-difficulty="medium"] {
    background: var(--primary-color);
    color: white;
}

.difficulty-btn[data-difficulty="hard"] {
    background: var(--error-color);
    color: white;
}

.difficulty-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}
