/* GLOBAL — TYGO GAMBLES SHELL */

:root {
    --green: #1fff87;
    --purple: #8126ff;
    --purple-glow: #a044ff;
    --bg-black: #07030a;
    --nav-bg: rgba(10, 5, 18, 0.94);
    --nav-height: 80px;
    --border: rgba(160, 68, 255, 0.15);
    --border-green: rgba(31, 255, 135, 0.2);
    --green-dim: rgba(31, 255, 135, 0.07);
    --purple-dim: rgba(129, 38, 255, 0.1);
    --text-muted: #8a81ad;
}

* {
    margin: 0; padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100vh;
    background: var(--bg-black);
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

/* ── ANIMATIONS ── */
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(31,255,135,0.7); }
    70%  { box-shadow: 0 0 0 9px rgba(31,255,135,0); }
    100% { box-shadow: 0 0 0 0 rgba(31,255,135,0); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── HEADER ── */
header {
    display: flex;
    align-items: center;
    padding: 0 40px;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    z-index: 9999;
    position: relative;
    animation: slideInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Gradient line along bottom of header */
header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--purple) 25%,
        var(--green) 50%,
        var(--purple) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
    opacity: 0.6;
}

/* ── LOGO ── */
.toplogo {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.toplogo img {
    height: 46px; width: 46px;
    border-radius: 50%;
    border: 2px solid var(--border-green);
    box-shadow: 0 0 16px rgba(31,255,135,0.15), inset 0 0 12px rgba(31,255,135,0.05);
    transition: box-shadow 0.3s, border-color 0.3s;
    object-fit: contain;
    background: #0c0816;
}

.toplogo img:hover {
    border-color: var(--green);
    box-shadow: 0 0 28px rgba(31,255,135,0.3);
}

.toplogo h1 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    /* Gradient text on logo name */
    background: linear-gradient(90deg, #fff 40%, var(--purple-glow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.toplogo h1 span {
    background: linear-gradient(90deg, var(--purple-glow), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── NAV ── */
nav {
    flex: 2;
    display: flex;
    justify-content: center;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 4px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 1.8px;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: color 0.25s, background 0.25s, border-color 0.25s, transform 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.04);
    transform: translateY(-1px);
}

/* Active state: green pill */
.nav-link.active {
    color: var(--green);
    background: var(--green-dim);
    border-color: var(--border-green);
}

/* Tiny dot indicator under active link */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

/* ── LIVE BADGE ── */
.header-spacer {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.status-container {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--purple-dim);
    padding: 9px 18px;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid rgba(160,68,255,0.3);
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

/* Shimmer on LIVE badge */
.status-container::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(160,68,255,0.15), transparent);
    background-size: 200% 100%;
    animation: shimmer 2.5s linear infinite;
}

.status-container:hover {
    background: rgba(129,38,255,0.16);
    border-color: var(--purple-glow);
    box-shadow: 0 0 20px rgba(129,38,255,0.2);
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
    flex-shrink: 0;
    position: relative; z-index: 1;
}

.status-text {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 0.68rem;
    color: #fff;
    letter-spacing: 1.5px;
    position: relative; z-index: 1;
}

/* ── MAIN / IFRAME ── */
main {
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: #000;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── MOBILE ── */
@media (max-width: 850px) {
    header {
        padding: 0 16px;
        height: 66px;
    }

    header::after { display: none; }

    .desktop-only { display: none !important; }

    .toplogo h1  { font-size: 1.1rem; letter-spacing: 1.5px; }
    .toplogo img { height: 36px; width: 36px; }

    .status-text { display: none; }
    .status-container {
        padding: 9px;
        border-radius: 50%;
        width: 36px; height: 36px;
        justify-content: center;
    }
    .status-container::after { display: none; }

    /* Bottom dock nav */
    nav {
        position: fixed;
        bottom: 0; left: 0;
        width: 100%;
        height: 68px;
        background: rgba(7, 3, 10, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border);
        padding: 0 8px;
        z-index: 10000;
        flex: none;
        display: flex;
        align-items: center;
    }

    /* Green shimmer on bottom dock top edge */
    nav::before {
        content: '';
        position: absolute;
        top: -1px; left: 0; right: 0;
        height: 1px;
        background: linear-gradient(90deg,
            transparent,
            var(--purple) 30%,
            var(--green) 50%,
            var(--purple) 70%,
            transparent
        );
        background-size: 200% 100%;
        animation: shimmer 4s linear infinite;
        opacity: 0.5;
    }

    .nav-list {
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }

    .nav-link {
        font-size: 0.6rem;
        padding: 10px 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-radius: 10px;
        letter-spacing: 1px;
        border: none;
    }

    /* Remove dot on mobile — too cramped */
    .nav-link.active::after { display: none; }

    main {
        height: calc(100vh - 66px - 68px);
    }
}

@media (max-width: 400px) {
    .toplogo h1 { display: none; }
    .nav-link   { font-size: 0.55rem; padding: 8px 6px; }
}
/* ── APPEND TO BOTTOM OF style.css ── */

/* Live badge: green when live, red-dim when offline */
.status-container .status-dot {
    background: #ff3c3c; /* default offline = red */
    animation: none;
}

.status-container.is-live .status-dot {
    background: var(--green);
    animation: pulse 2s infinite;
}

.status-container .status-text {
    color: #ff6060; /* offline text color */
}

.status-container.is-live .status-text {
    color: #fff;
}

/* Offline badge styling — muted red tint */
.status-container:not(.is-live) {
    background: rgba(255, 60, 60, 0.07);
    border-color: rgba(255, 60, 60, 0.25);
}

.status-container:not(.is-live):hover {
    background: rgba(255, 60, 60, 0.12);
    border-color: rgba(255, 60, 60, 0.4);
    box-shadow: 0 0 20px rgba(255, 60, 60, 0.15);
}

/* ── MOBILE: hide Tournaments, Bonus Hunts, Raffles in bottom nav ── */
@media (max-width: 850px) {
    .desktop-only {
        display: none !important;
    }
}