/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #ffffff;
}

h3 {
    font-size: 1.8rem;
    color: #ffffff;
}

p {
    margin-bottom: 1rem;
    color: #b8c5d1;
    font-weight: 400;
}

/* Header and Navigation */
.header {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.nav-brand a {
    font-size: 1.8rem;
    font-weight: 800;
    color: #667eea;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.nav-brand a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-brand a:hover::after {
    transform: scaleX(1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #b8c5d1;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 220px;
    z-index: 100;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: #b8c5d1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 140px 0 100px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 50px 50px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="80" height="80" viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="40" cy="40" r="6"/><circle cx="10" cy="10" r="3"/><circle cx="70" cy="70" r="4"/></g></svg>');
    animation: float 25s infinite linear;
}

@keyframes float {
    0% { transform: translateX(0px) translateY(0px) rotate(0deg); }
    100% { transform: translateX(-80px) translateY(-80px) rotate(360deg); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero h1 {
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
    -webkit-text-fill-color: white;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-10px);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Featured Quiz Section */
.featured-quiz {
    padding: 100px 0;
    background: rgba(26, 26, 46, 0.5);
    backdrop-filter: blur(10px);
}

.featured-quiz h2 {
    color: #ffffff;
    margin-bottom: 3rem;
    position: relative;
}

.featured-quiz h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* More Quizzes Section */
.more-quizzes {
    padding: 100px 0;
    background: rgba(22, 33, 62, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50px 50px 0 0;
    margin-top: 50px;
}

.more-quizzes h2 {
    color: #ffffff;
    margin-bottom: 4rem;
    position: relative;
}

.more-quizzes h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.quiz-card {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.quiz-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(102, 126, 234, 0.4);
}

.quiz-card:hover::before {
    transform: scaleX(1);
}

.quiz-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.quiz-card h3 {
    color: #ffffff;
    margin-bottom: 0;
    font-size: 1.4rem;
}

.quiz-difficulty {
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-difficulty.easy {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.quiz-difficulty.medium {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.quiz-difficulty.hard {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.quiz-card p {
    margin-bottom: 2rem;
    color: #b8c5d1;
    line-height: 1.7;
}

.quiz-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #8892b0;
    font-weight: 500;
}

.quiz-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-meta span::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn::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 ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(26, 26, 46, 0.8);
    color: #b8c5d1;
    border: 2px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-3px);
    color: #ffffff;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    color: white;
    padding: 4rem 0 2rem;
    border-radius: 50px 50px 0 0;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23667eea" fill-opacity="0.05"><circle cx="30" cy="30" r="4"/></g></svg>');
    animation: float 30s infinite linear reverse;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.footer-brand h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.footer-brand p {
    color: #b8c5d1;
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: #b8c5d1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-column ul li a:hover {
    color: #667eea;
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    padding-top: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-bottom p {
    color: #b8c5d1;
    margin: 0;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background: rgba(15, 15, 35, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        transition: left 0.3s ease;
        border-top: 1px solid rgba(102, 126, 234, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 300px;
    }

    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 120px 0 80px;
        border-radius: 0 0 30px 30px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .quiz-card {
        padding: 2rem;
        border-radius: 20px;
    }

    .quiz-card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .more-quizzes,
    .featured-quiz {
        padding: 80px 0;
    }

    .more-quizzes {
        border-radius: 30px 30px 0 0;
    }

    .footer {
        border-radius: 30px 30px 0 0;
    }
}