:root {
    --bg-color: #050510;
    --text-color: #ffffff;
    --primary-color: #00ff88;
    --secondary-color: #00ccff;
    --accent-color: #ff0055;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Animations */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite alternate;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -50px;
    left: -50px;
}

.globe-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: 50px;
    right: -50px;
    animation-delay: 2s;
}

.globe-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    padding: 1rem 2.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.icon-svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.cta-button:hover .icon-svg {
    transform: scale(1.2);
}

.cta-button.telegram {
    background: linear-gradient(45deg, #0088cc, #00aaff);
}

.cta-button.telegram:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
}

.cta-button.youtube {
    background: linear-gradient(45deg, #ff0000, #ff4d4d);
}

.cta-button.youtube:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

/* =========================================
   Catalog Section (Textbooks) - MODAL
   ========================================= */
.catalog-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.catalog-section.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.catalog-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.catalog-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #fff, var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
    margin-top: 1rem;
}

.section-subtitle {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Controls */
.close-btn,
.back-btn {
    position: absolute;
    top: 20px;
    font-size: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2005;
    transition: transform 0.3s ease, color 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.close-btn {
    right: 20px;
}

.back-btn {
    left: 20px;
}

.close-btn:hover,
.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
}

/* Selection Grid */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 900px;
    margin: auto;
}

.selection-card {
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.selection-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.selection-card .icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.selection-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.selection-card p {
    color: #aaa;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.video-card {
    border-radius: 20px;
    overflow: hidden;
    padding: 0;
    background: rgba(0, 0, 0, 0.4);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-card h3 {
    padding: 1.5rem;
    font-size: 1.2rem;
    margin: 0;
    text-align: center;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 4rem;
}

/* Scrollbar for modal */
.catalog-grid::-webkit-scrollbar {
    width: 8px;
}

.catalog-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.catalog-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.grade-card {
    padding: 2rem;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.grade-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.15);
}

.grade-number {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    z-index: 0;
    user-select: none;
}

.grade-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.grade-card p {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    flex-grow: 1;
}

.download-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    z-index: 2;
    /* Clearly clickable */
}

.download-btn:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.5));
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: rotate(10deg) scale(1.1);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.highlight {
    color: var(--primary-color);
}

nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 80px 0;
}

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s, background 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* About Section */
.about {
    margin: 40px 0 80px;
    text-align: center;
    padding: 60px;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.owner-info {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.owner-name {
    color: var(--secondary-color);
    font-weight: 600;
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin: 0 15px;
    font-size: 1rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

/* =========================================
   Guides Section (Qo'llanmalar)
   ========================================= */
.guide-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.guide-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 4rem;
}

.guide-item {
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.guide-item.active {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.guide-header {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    gap: 1.5rem;
    background: transparent;
    transition: background 0.2s;
}

.guide-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.guide-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
}

.guide-summary {
    flex-grow: 1;
}

.guide-summary h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    color: white;
}

.guide-summary p {
    font-size: 0.95rem;
    color: #aaa;
    margin: 0;
}

.guide-arrow {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.guide-item.active .guide-arrow {
    transform: rotate(180deg);
}

.guide-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.guide-item.active .guide-content {
    max-height: 2000px;
    transition: max-height 0.8s ease-in;
}

.content-text {
    padding: 2rem;
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1.05rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.content-text p {
    margin-bottom: 1.5rem;
}

.content-text ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style-type: none;
}

.content-text li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 20px;
}

.content-text li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.content-text strong {
    color: var(--secondary-color);
}

.guide-image-container {
    width: 100%;
    margin: 2rem 0;
    text-align: center;
}

.guide-image-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.guide-image-container img:hover {
    transform: scale(1.02);
}

.img-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {

    /* Header */
    header {
        flex-direction: column;
        gap: 20px;
        padding-top: 20px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        /* Allows wrap for many links */
        justify-content: center;
        gap: 15px;
    }

    nav a {
        margin: 5px;
        /* Less margin */
        font-size: 0.95rem;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 60px;
    }

    .hero h1 {
        font-size: 2.8rem;
        /* Smaller H1 */
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .cta-group {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
    }

    .cta-button {
        width: 80%;
        /* Full width buttons */
        justify-content: center;
        font-size: 1rem;
    }

    /* Features Grid */
    .features {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 20px;
    }

    /* Catalog Modem */
    .catalog-section h2 {
        font-size: 1.8rem;
    }

    .selection-grid,
    .catalog-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 1.5rem;
    }

    .selection-card {
        padding: 2rem 1.5rem;
    }

    .selection-card .icon {
        font-size: 3.5rem;
    }

    /* Cards */
    .grade-card {
        min-height: auto;
        padding: 1.5rem;
    }

    .grade-number {
        font-size: 4rem;
        top: -10px;
        right: -10px;
    }

    /* Guides */
    .guide-header {
        padding: 1rem;
    }

    .guide-icon {
        font-size: 1.5rem;
    }

    .content-text {
        padding: 1rem;
    }
}