/* ═══════════════════════════════════════════════════════════
   INFINITE CRAPS - MOBILE + NAV STYLES
   Nav/tab-bar styles (always active) + mobile adjustments.
   Grid layout handled in index.html inline styles.
   ═══════════════════════════════════════════════════════════ */

/* ===== NAV / TAB BAR (always active — desktop) ===== */

.tab-bar {
    background: linear-gradient(135deg, #1a0f0a 0%, #0d0705 100%);
    border-bottom: 3px solid #8b7355;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: relative;
    z-index: 100;
}

.site-logo {
    font-family: 'Anton', sans-serif;
    color: #ffd700;
    padding: 10px 20px;
    letter-spacing: 1.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7), 0 0 8px rgba(255,215,0,0.15);
    border-right: 2px solid #8b7355;
    user-select: none;
    font-size: 26px;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-logo .i-with-dice {
    position: relative;
    display: inline-block;
}

.site-logo .i-with-dice .dice-dot {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
}

.tabs-container {
    display: flex;
    flex-shrink: 0;
}

.header-spacer {
    flex: 1;
}

.feedback-btn {
    background: rgba(255,215,0,0.08);
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 4px;
    color: rgba(255,215,0,0.5);
    font-size: 9px;
    font-weight: 600;
    padding: 3px 8px;
    margin: 0 15px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: background 0.2s;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
}
.feedback-btn:hover {
    background: rgba(255,215,0,0.15);
}

.tagline-section {
    padding: 8px 20px;
    text-align: right;
    flex-shrink: 1;
    min-width: 0;
}

.tagline {
    font-family: 'Anton', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    white-space: nowrap;
}

.subheading {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    color: #e8e0d0;
    font-weight: 400;
    opacity: 0.9;
    white-space: nowrap;
}

.tab {
    padding: 15px 30px;
    background: rgba(139, 0, 0, 0.3);
    border: none;
    border-right: 1px solid #8b7355;
    color: #e8e0d0;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab:hover {
    background: rgba(139, 0, 0, 0.5);
}

.tab.active {
    background: rgba(139, 0, 0, 0.6);
    color: #ffd700;
    border-bottom: 2px solid #ffd700;
}

/* ===== MOBILE ( <= 768px ) ===== */

@media (max-width: 768px) {
    body {
        overflow: auto !important;
        height: auto !important;
    }

    /* --- header becomes vertical stack --- */
    .tab-bar {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        padding: 10px 10px 8px !important;
        gap: 4px;
        position: relative !important;
    }

    /* hide desktop spacer */
    .header-spacer {
        display: none !important;
    }

    /* 1) Logo — centered, big */
    .site-logo {
        order: 1 !important;
        font-size: 34px;
        width: 100%;
        text-align: center !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-right: none !important;
        padding: 6px 10px 2px;
        flex-shrink: 0;
    }
    .site-logo .i-with-dice .dice-dot {
        top: 1px;
        font-size: 9px;
    }

    /* 2) Tagline — centered */
    .tagline-section {
        order: 2 !important;
        width: 100%;
        text-align: center !important;
        padding: 2px 15px 4px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1px;
    }
    .tagline {
        font-size: 12px !important;
        text-align: center !important;
        white-space: normal !important;
    }
    .subheading {
        font-size: 9px !important;
        text-align: center !important;
        white-space: normal !important;
    }

    /* 3) Feedback wrapper — top-right corner, emoji only */
    #feedbackWrap {
        order: 3 !important;
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        width: auto !important;
        align-items: flex-end !important;
    }
    /* Hide changelog link and mailing list on mobile — shown in strip below instead */
    #feedbackWrap a {
        display: none !important;
    }
    #mailingListForm,
    #mailingListMsg {
        display: none !important;
    }
    .feedback-btn {
        font-size: 18px !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        color: rgba(200,195,170,0.55) !important;
        padding: 4px !important;
        margin: 0 !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        /* Hide text, show only the emoji */
        text-indent: -9999px;
        overflow: hidden;
        width: 28px;
        height: 28px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    /* Re-show just the emoji via ::before */
    .feedback-btn::before {
        content: '💬';
        font-size: 18px;
        text-indent: 0;
        display: block;
    }
    .feedback-btn:hover,
    .feedback-btn:active {
        background: rgba(255,215,0,0.08) !important;
        border-color: transparent !important;
        color: rgba(255,215,0,0.7) !important;
    }

    /* Mobile mailing list strip */
    #mobileMailingStrip {
        display: block !important;
    }

    /* 4) Tabs — single row, equal width */
    .tabs-container {
        order: 4 !important;
        width: 100%;
        display: flex !important;
        justify-content: center;
        align-items: center;
        gap: 3px;
        flex-wrap: nowrap !important;
    }
    .tab {
        font-size: 9px;
        padding: 5px 6px;
        flex: 1 1 0;
        white-space: nowrap;
        text-align: center;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* Games tab: same row, same flex */
    .tab.tab-games,
    .tab.tab-games:visited,
    .tab.tab-games:active {
        font-size: 9px;
        padding: 5px 6px;
        flex: 1 1 0;
        white-space: nowrap;
        text-align: center;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #90caf9 !important;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .site-logo {
        font-size: 28px;
    }
    .site-logo .i-with-dice .dice-dot {
        top: 1px;
        font-size: 9px;
    }
    .tab {
        font-size: 8px;
        padding: 4px 4px;
    }
    .tab.tab-games {
        font-size: 8px;
        padding: 4px 4px;
    }
}
