:root {
    --ol: rgb(0, 0, 0);
    --il: rgb(40, 40, 48);
    --fill: #080910;
    --fill-h: #0c0d18;
    --fill-d: #060710;
    font-family: 'Poppins', sans-serif;
}

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

body {
    background: linear-gradient(135deg, #000000 0%, #010108 30%, #030410 60%, #040610 100%);
    color: #bbb;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    user-select: none;
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

#g-load {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.g-spin {
    width: 20px;
    height: 20px;
    border: 2px solid #0a0a10;
    border-top: 2px solid #4466aa;
    border-radius: 50%;
    animation: spin 0.9s cubic-bezier(0.4, 0.1, 0.6, 0.9) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.g-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#app {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#app.visible {
    opacity: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    position: relative;
    /* Added padding-bottom so hovering down into dropdown is seamless */
    padding-bottom: 8px;
    margin-bottom: -8px;
}

.nav-tab {
    background: var(--ol);
    padding: 1px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab:hover {
    transform: translateY(-1px);
}

.nav-tab:active {
    transform: translateY(0);
}

.nav-tab-in {
    border: 1px solid var(--il);
    background: var(--fill);
    padding: 7px 18px;
    font-size: 0.7rem;
    color: #444;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-tab:hover .nav-tab-in {
    background: var(--fill-h);
    color: #999;
    border-color: rgba(60, 70, 100, 0.5);
}

.nav-tab.on .nav-tab-in {
    background: var(--fill-h);
    color: #ccc;
    border-color: rgba(80, 100, 160, 0.4);
}

.nav-drop {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    padding-top: 4px; /* Move gap inside so hover hit area connects */
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.nav-drop-wrapper {
    background: var(--ol);
    padding: 1px;
}

.nav-drop-in {
    border: 1px solid var(--il);
    background: var(--fill);
    display: flex;
    flex-direction: column;
}

.nav-item:hover .nav-drop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-sub {
    padding: 8px 16px;
    font-size: 0.66rem;
    color: #3a3a44;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                padding-left 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(40, 40, 48, 0.3);
}

.nav-sub:last-child {
    border-bottom: none;
}

.nav-sub:hover {
    background: var(--fill-h);
    color: #aaa;
    padding-left: 20px;
}

.nav-sub.on {
    color: #888;
}

.dc {
    background: var(--ol);
    padding: 1px;
    display: block;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dc:hover {
    transform: translateY(-1px);
}

.dc-in {
    border: 1px solid var(--il);
    width: 34px;
    height: 34px;
    background: var(--fill);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dc svg {
    width: 15px;
    color: #3a3a44;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dc:hover .dc-in {
    background: var(--fill-h);
    border-color: rgba(60, 70, 100, 0.5);
}

.dc:hover svg {
    color: #bbb;
}

.content {
    flex: 1;
    padding: 6px 22px 22px;
    overflow-y: auto;
}

.panel {
    background: var(--ol);
    padding: 1px;
    max-width: 920px;
    opacity: 0;
    transform: translateY(8px);
    animation: panelIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes panelIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-in {
    border: 1px solid var(--il);
    background: var(--fill);
    padding: 24px;
}

.panel-title {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(40, 40, 48, 0.4);
}

.panel-txt {
    font-size: 0.68rem;
    color: #444;
    line-height: 1.6;
}

.o-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.o-card {
    background: var(--ol);
    padding: 1px;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    animation: cardIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.o-card:nth-child(1) { animation-delay: 0.05s; }
.o-card:nth-child(2) { animation-delay: 0.1s; }
.o-card:nth-child(3) { animation-delay: 0.15s; }
.o-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.o-card:hover {
    transform: translateY(-2px);
}

.o-card-in {
    border: 1px solid var(--il);
    background: var(--fill-d);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.o-card:hover .o-card-in {
    background: var(--fill);
    border-color: rgba(60, 70, 100, 0.45);
}

.o-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #777;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.o-card:hover .o-label {
    color: #bbb;
}

.o-dl {
    background: var(--ol);
    padding: 1px;
    width: 100%;
    cursor: pointer;
    border: none;
    outline: none;
    margin-top: 6px;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.o-dl:active {
    transform: scale(0.97);
}

.o-dl-in {
    border: 1px solid var(--il);
    background: var(--fill);
    padding: 7px 0;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.62rem;
    color: #444;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.o-dl:hover .o-dl-in {
    background: var(--fill-h);
    color: #aaa;
    border-color: rgba(60, 70, 100, 0.45);
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(40, 40, 55, 0.6);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(60, 60, 80, 0.8);
}

.spot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    height: 80px;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.spot-widget.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-tab-in {
        padding: 8px 14px;
        font-size: 0.65rem;
    }

    /* On mobile, standard hover states break because of touch inputs replacing the DOM.
       Instead, we constantly show the sub-menu dropdown underneath the actively selected tab. */
    .nav-tab.on + .nav-drop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(4px);
        /* Switch from absolute to relative to stack nicely in the mobile flex layout */
        position: relative;
        width: 100%;
    }

    .nav-drop {
        top: auto;
    }

    .content {
        padding: 0 16px 16px;
    }

    .panel-in {
        padding: 16px;
    }

    .panel-txt {
        font-size: 0.62rem;
    }

    .o-grid {
        /* Drop from 4 columns to 2 columns on tablets */
        grid-template-columns: repeat(2, 1fr);
    }

    .spot-widget {
        bottom: 12px;
        right: 12px;
        width: 260px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .o-grid {
        /* Drop to a single column on tight phones */
        grid-template-columns: 1fr;
    }
}