@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --primary: #0047AB;
    --accent: #FFD700;
    --bg-dark: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-light: #0F172A;
    --text-muted: #64748B;
    --glass: rgba(255, 255, 255, 0.8);
    --border: #E2E8F0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism Navigation */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), #0077FF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    position: relative;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-extra {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#lang-select {
    background: #f1f5f9;
    border: none;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    outline: none;
}

#lang-select:hover {
    background: #e2e8f0;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

.nav-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Sections Layout */
section {
    padding: 100px 10%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--primary);
    text-align: center;
}

/* Hero Section */
#home {
    background: linear-gradient(rgba(248, 250, 252, 0.85), rgba(248, 250, 252, 0.85)), url('volleyball_hero_bg_1771280655481.png');
    background-size: cover;
    background-position: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

/* History Grid */
.history-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.history-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.history-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

#quiz-result-pos {
    color: var(--primary) !important;
    margin: 1rem 0;
    font-weight: 800;
}

/* Interactive Court */
.court-container {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
}

.court-image {
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
    border-radius: 12px;
}

/* AI Hub Components */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.ai-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.ai-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
}

.ai-chat {
    height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 10px;
}

.ai-input-group {
    display: flex;
    gap: 0.5rem;
}

input,
select,
textarea {
    background: white;
    border: 1px solid var(--border);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    color: var(--text-light);
    width: 100%;
}

/* Animations */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.volleyball-svg {
    width: 50px;
    animation: bounce 2s infinite ease-in-out;
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.countdown-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    min-width: 100px;
}

.countdown-item span {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}


/* Floating Action Button (FAB) */
.ai-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 71, 171, 0.3);
    z-index: 1001;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.ai-fab:hover {
    transform: scale(1.1) rotate(15deg);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 24, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border: 1px solid var(--border);
    border-radius: 30px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    padding: 3rem;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent);
}

/* AI Tabs in Modal */
.ai-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.ai-chat-container {
    background: #f1f5f9;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.ai-chat-history {
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.chat-msg {
    max-width: 85%;
    padding: 0.8rem 1.2rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.bot-msg {
    align-self: flex-start;
    background: white;
    color: var(--text-light);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-msg {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-input-group {
    display: flex;
    gap: 0.8rem;
}

.ai-input-group input {
    flex: 1;
}

/* Quiz Specific Styles */
.quiz-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    background: #FFFFFF;
    border: 2px solid var(--border);
    padding: 1.2rem 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.quiz-option::before {
    content: '→';
    color: var(--primary);
    opacity: 0;
    transition: var(--transition);
    transform: translateX(-10px);
}

.quiz-option:hover {
    background: #F8FAFC;
    border-color: var(--primary);
    transform: translateX(10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.quiz-option:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.quiz-option:active {
    transform: scale(0.98) translateX(5px);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite ease-in-out;
}

@media (max-width: 768px) {
    .history-container {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    nav {
        padding: 1rem 5%;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .ai-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 80px 5%;
    }

    .countdown {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .countdown-item {
        min-width: 80px;
        padding: 1rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .ai-tabs {
        flex-wrap: nowrap;
    }

    .ai-fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}