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

body {

    background: #0f1117;

    color: #f1f1f1;

    font-family:
        Arial,
        sans-serif;

    min-height: 100vh;

    overflow-x: hidden;
}


/* ========================================= */
/* HEADER */
/* ========================================= */

.top-header {

    text-align: center;

    padding: 30px 20px;

    transition: 0.25s;
}

.top-header h1 {

    font-size: 2.2rem;

    margin-bottom: 10px;
}

.subtitle {

    opacity: 0.7;
}


/* ========================================= */
/* STICKY NAV */
/* ========================================= */

#stickyNav {

    position: sticky;

    top: 0;

    z-index: 900;

    background:
        rgba(15, 17, 23, 0.92);

    backdrop-filter: blur(12px);

    border-bottom:
        1px solid
        rgba(255,255,255,0.05);

    box-shadow:
        0 2px 12px
        rgba(0,0,0,0.28);

    transition: 0.25s;
}


/* ========================================= */
/* CATEGORY ROWS */
/* ========================================= */

.main-categories,
.sub-categories {

    display: flex;

    gap: 14px;

    overflow-x: auto;

    flex-wrap: nowrap;

    scrollbar-width: none;

    -ms-overflow-style: none;

    position: relative;
}

.main-categories::-webkit-scrollbar,
.sub-categories::-webkit-scrollbar {

    display: none;
}


/* ========================================= */
/* EDGE FADE */
/* ========================================= */

.main-categories::after,
.sub-categories::after {

    content: "";

    position: absolute;

    right: 0;

    top: 0;

    width: 40px;

    height: 100%;

    pointer-events: none;

    background:
        linear-gradient(
            to right,
            transparent,
            rgba(15,17,23,0.96)
        );
}


/* ========================================= */
/* DESKTOP CENTERING */
/* ========================================= */

@media (min-width: 769px) {

    .main-categories,
    .sub-categories {

        justify-content: center;
    }
}


/* ========================================= */
/* CATEGORY PADDING */
/* ========================================= */

.main-categories {

    padding:
        18px
        18px
        10px;
}

.sub-categories {

    padding:
        10px
        18px
        18px;
}


/* ========================================= */
/* MAIN TABS */
/* ========================================= */

.main-tab {

    flex: 0 0 auto;

    background: #1e2430;

    color: white;

    border: none;

    padding: 15px 25px;

    border-radius: 14px;

    cursor: pointer;

    font-size: 1rem;

    transition: 0.2s;

    min-width: 220px;
}

.main-tab:hover {

    transform: translateY(-2px);
}

.main-tab.active {

    background: #2962ff;
}


/* ========================================= */
/* WYCKOFF TAB */
/* ========================================= */

.wyckoff-tab {

    background:
        linear-gradient(
            135deg,
            #7a1f1f,
            #b8860b
        );
}

.experimental {

    display: block;

    font-size: 0.74rem;

    margin-top: 5px;

    opacity: 0.82;
}


/* ========================================= */
/* SUB TILES */
/* ========================================= */

.sub-tile {

    flex: 0 0 auto;

    background: #1a1d25;

    color: white;

    border: none;

    padding: 12px 18px;

    border-radius: 12px;

    cursor: pointer;

    transition: 0.2s;

    min-width: 170px;

    text-align: center;
}

.sub-tile:hover {

    transform: scale(1.03);
}

.sub-tile.active {

    background: #2962ff;
}

.sub-tile.wyckoff {

    background:
        linear-gradient(
            135deg,
            #6d1e1e,
            #9c7a0c
        );
}


/* ========================================= */
/* LEARNERS */
/* ========================================= */

.learners-section {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 1fr)
        );

    gap: 20px;

    padding: 25px;
}

.learn-card {

    background: #1b1f2b;

    border-radius: 16px;

    padding: 25px;

    transition: 0.2s;
}

.learn-card:hover {

    transform: translateY(-3px);
}

.learn-card h2 {

    margin-bottom: 15px;

    font-size: 1.2rem;
}

.learn-card p {

    opacity: 0.8;

    line-height: 1.5;
}


/* ========================================= */
/* CHART GRID */
/* ========================================= */

.chart-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(320px, 1fr)
        );

    gap: 18px;

    padding: 25px;
}

.chart-card {

    background: #181c24;

    border-radius: 16px;

    overflow: hidden;

    transition: 0.2s;

    cursor: pointer;
}

.chart-card:hover {

    transform: translateY(-3px);
}


/* ========================================= */
/* CHART IMAGE */
/* ========================================= */

.chart-image-wrapper {

    position: relative;
}

.chart-card img {

    width: 100%;

    display: block;
}


/* ========================================= */
/* TRADINGVIEW ICON */
/* ========================================= */

.tv-link {

    position: absolute;

    top: 10px;

    right: 10px;

    width: 34px;

    height: 34px;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.92);

    display: flex;

    justify-content: center;

    align-items: center;

    z-index: 20;

    transition: 0.2s;
}

.tv-link:hover {

    transform: scale(1.08);
}

.tv-link img {

    width: 22px;

    height: 22px;

    object-fit: contain;
}


/* ========================================= */
/* CHART INFO */
/* ========================================= */

.chart-info {

    padding: 12px;
}

.chart-info h3 {

    font-size: 1rem;

    margin-bottom: 5px;
}

.chart-info p {

    opacity: 0.7;

    font-size: 0.9rem;
}


/* ========================================= */
/* MODAL */
/* ========================================= */

.modal {

    position: fixed;

    inset: 0;

    background:
        rgba(0,0,0,0.92);

    display: flex;

    justify-content: center;

    align-items: center;

    z-index: 1000;
}

.modal img {

    width: auto;

    height: auto;

    max-width: 100vw;

    max-height: 100vh;

    object-fit: contain;
}


/* ========================================= */
/* CLOSE BUTTON */
/* ========================================= */

.close-btn {

    position: absolute;

    top: 20px;

    right: 30px;

    font-size: 42px;

    cursor: pointer;

    z-index: 1200;
}


/* ========================================= */
/* MODAL NAVIGATION */
/* ========================================= */

.nav-btn {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    background:
        rgba(0,0,0,0.55);

    backdrop-filter: blur(4px);

    color: white;

    border: none;

    font-size: 42px;

    width: 60px;

    height: 60px;

    border-radius: 50%;

    cursor: pointer;

    z-index: 1100;

    transition: 0.2s;

    opacity: 0.95;

    display: flex;

    justify-content: center;

    align-items: center;
}

.nav-btn:hover {

    background:
        rgba(255,255,255,0.2);
}

.prev-btn {

    left: 20px;
}

.next-btn {

    right: 20px;
}


/* ========================================= */
/* FOOTER */
/* ========================================= */

.footer {

    text-align: center;

    padding: 25px;

    opacity: 0.7;
}


/* ========================================= */
/* UTILITY */
/* ========================================= */

.hidden {

    display: none;
}


/* ========================================= */
/* COMPACT SCROLL MODE */
/* ========================================= */

body.scrolled .top-header {

    opacity: 0;

    transform: translateY(-100%);

    height: 0;

    overflow: hidden;

    padding: 0;

    margin: 0;
}

body.scrolled .main-categories {

    padding-top: 10px;
}

body.scrolled .main-tab {

    padding: 11px 20px;

    font-size: 0.92rem;
}

body.scrolled .sub-tile {

    padding: 10px 15px;

    font-size: 0.9rem;
}


/* ========================================= */
/* MOBILE */
/* ========================================= */

@media (max-width: 768px) {

    .top-header {

        padding: 20px 15px;
    }

    .top-header h1 {

        font-size: 2rem;
    }

    .main-tab {

        min-width: 220px;
    }

    .sub-tile {

        min-width: 180px;
    }

    .chart-grid {

        grid-template-columns: 1fr;

        padding: 15px;
    }

    .chart-card {

        border-radius: 14px;
    }

    .nav-btn {

        width: 50px;

        height: 50px;

        font-size: 32px;
    }

    .prev-btn {

        left: 6px;
    }

    .next-btn {

        right: 6px;
    }
}