/* ============================================
   DINO ARCADE — Design System
   Premium dark arcade theme
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-card: #16161f;
    --bg-input: #1e1e2d;

    --gold: #d4a017;
    --gold-light: #e8b923;
    --gold-dark: #b8860b;
    --gold-glow: rgba(212, 160, 23, 0.3);
    --gold-gradient: linear-gradient(135deg, #d4a017, #f0c040, #d4a017);

    --green: #10b981;
    --green-dark: #059669;
    --red: #ef4444;
    --red-dark: #dc2626;
    --blue: #3b82f6;

    --text-primary: #f1f1f1;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --border-color: #2a2a3a;
    --border-gold: rgba(212, 160, 23, 0.3);

    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-gold: 0 0 20px rgba(212, 160, 23, 0.2);

    --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Dino Logo --- */
.dino-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.dino-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(212, 160, 23, 0.3));
    transition: filter 0.4s ease, transform 0.4s ease;
}

.dino-logo:hover .dino-svg {
    filter: drop-shadow(0 0 16px rgba(212, 160, 23, 0.5));
    transform: scale(1.05);
}

/* Logo fade-in animation */
.dino-logo-fade {
    animation: dinoFadeIn 1.2s ease-out;
}

@keyframes dinoFadeIn {
    0% { opacity: 0; transform: scale(0.8) translateY(10px); filter: blur(8px); }
    60% { opacity: 0.8; filter: blur(1px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* Hero-specific pulsing glow */
.dino-logo-hero .dino-svg {
    animation: dinoHeroGlow 3s ease-in-out infinite alternate, dinoFloat 4s ease-in-out infinite;
}

@keyframes dinoHeroGlow {
    0% { filter: drop-shadow(0 0 10px rgba(212, 160, 23, 0.3)); }
    100% { filter: drop-shadow(0 0 30px rgba(212, 160, 23, 0.6)) drop-shadow(0 0 60px rgba(212, 160, 23, 0.2)); }
}

@keyframes dinoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Topbar logo size override */
.topbar-brand .dino-logo {
    width: 30px !important;
    height: 30px !important;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.3;
}

.gold-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   TOPBAR NAVIGATION
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.topbar-brand .dino-logo {
    width: 30px !important;
    height: 30px !important;
}

.topbar-brand-text {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* Topbar Nav Links */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 4px;
}

.topbar-nav::-webkit-scrollbar { display: none; }

.topbar-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-body);
    position: relative;
    line-height: 1.2;
}

.topbar-link:hover {
    color: var(--gold);
    background: rgba(212, 160, 23, 0.08);
}

.topbar-link.active {
    color: var(--gold);
    background: rgba(212, 160, 23, 0.12);
}

.topbar-link-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.topbar-link-arrow {
    margin-left: 2px;
    transition: transform 0.2s;
}

.topbar-link-sm {
    padding: 6px 8px;
}

.topbar-link-sm span:not(.topbar-link-icon):not(.topbar-badge):not(.topbar-badge-new) {
    display: none;
}

.topbar-nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 4px;
    flex-shrink: 0;
}

/* Topbar Badges */
.topbar-badge {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--red);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.topbar-badge-new {
    background: var(--green);
    font-size: 0.5rem;
    letter-spacing: 0.5px;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.topbar-quest-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    background: #e94560;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 6px rgba(233, 69, 96, 0.6);
    pointer-events: none;
    animation: questBadgePulse 2s infinite;
}
@keyframes questBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Topbar Right */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.topbar-balance {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-tertiary);
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-gold);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Spotify button in topbar */
.topbar-spotify-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: none;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    text-decoration: none;
}

.topbar-spotify-btn:hover {
    border-color: #1db954;
    color: #1db954;
    background: rgba(29, 185, 84, 0.08);
}

.topbar-spotify-btn.connected {
    border-color: #1db954;
    color: #1db954;
}

.spotify-icon {
    flex-shrink: 0;
}

/* Spotify wrapper needs relative for dropdown */
.topbar-spotify {
    position: relative;
}

/* ============================================
   SPOTIFY DROPDOWN PLAYER (tooltip-style)
   ============================================ */
.spotify-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: -40px;
    width: 300px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(29, 185, 84, 0.1);
    padding: 14px;
    z-index: 1300;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Arrow pointing up */
.spotify-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 48px;
    width: 12px;
    height: 12px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.spotify-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Tabs */
.spotify-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin: -14px -14px 12px;
    padding: 0;
}

.spotify-tab {
    flex: 1;
    padding: 9px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.spotify-tab:hover {
    color: var(--text-secondary);
}

.spotify-tab.active {
    color: #1db954;
    border-bottom-color: #1db954;
}

.spotify-tab-content {
    display: none;
}

.spotify-tab-content.active {
    display: block;
}

/* Playlists list */
.spotify-playlists-list {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.spotify-playlists-list::-webkit-scrollbar { width: 4px; }
.spotify-playlists-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.spotify-playlists-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 20px 0;
}

.spotify-playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
}

.spotify-playlist-item:hover {
    background: rgba(29, 185, 84, 0.08);
}

.spotify-playlist-item.playing {
    background: rgba(29, 185, 84, 0.12);
}

.spotify-playlist-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.spotify-liked-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #450af5, #8e8ee5);
}

.spotify-playlist-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.spotify-playlist-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-playlist-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.spotify-playlist-play {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1db954;
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
}

.spotify-playlist-item:hover .spotify-playlist-play {
    opacity: 1;
}

.spotify-playlist-play:hover {
    transform: scale(1.1);
    background: #1ed760;
}

/* Queue list */
.spotify-queue-list {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.spotify-queue-list::-webkit-scrollbar { width: 4px; }
.spotify-queue-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.spotify-queue-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    position: relative;
}

.spotify-queue-playable {
    cursor: pointer;
    transition: background 0.15s;
}

.spotify-queue-playable:hover {
    background: rgba(255, 255, 255, 0.06);
}

.spotify-queue-playable:hover .spotify-queue-num {
    display: none;
}

.spotify-queue-playable .spotify-queue-play-icon {
    display: none;
    color: #1db954;
    min-width: 16px;
    text-align: center;
}

.spotify-queue-playable:hover .spotify-queue-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spotify-queue-playable.loading {
    opacity: 0.5;
    pointer-events: none;
}

.spotify-queue-item.now-playing {
    background: rgba(29, 185, 84, 0.1);
}

.spotify-queue-num {
    font-size: 0.65rem;
    color: var(--text-muted);
    min-width: 16px;
    text-align: center;
}

.spotify-queue-cover {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.spotify-queue-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.spotify-queue-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-queue-artist {
    font-size: 0.62rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-queue-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 4px 4px;
    letter-spacing: 0.5px;
}

/* ---- Lyrics tab ---- */
.spotify-lyrics-container {
    max-height: 320px;
    overflow-y: auto;
    padding: 12px 8px;
    scroll-behavior: smooth;
}
.spotify-lyrics-container::-webkit-scrollbar { width: 4px; }
.spotify-lyrics-container::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.spotify-lyrics-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 40px 10px;
}
.spotify-lyrics-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,.15);
    border-top-color: #1db954;
    border-radius: 50%;
    animation: spotifyLyricsSpin .6s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}
@keyframes spotifyLyricsSpin { to { transform: rotate(360deg); } }

.spotify-lyrics-synced {
    padding: 20px 0;
}
.spotify-lyric-line {
    font-size: 0.82rem;
    line-height: 1.7;
    color: rgba(255,255,255,.3);
    padding: 3px 8px;
    margin: 0;
    border-radius: 4px;
    transition: color .3s, transform .3s, font-size .3s;
    cursor: pointer;
}
.spotify-lyric-line:hover {
    color: rgba(255,255,255,.55);
}
.spotify-lyric-line.past {
    color: rgba(255,255,255,.4);
}
.spotify-lyric-line.active {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    transform: scale(1.02);
}

.spotify-lyrics-plain {
    padding: 8px 4px;
}
.spotify-lyrics-plain p {
    font-size: 0.78rem;
    line-height: 1.6;
    color: rgba(255,255,255,.6);
    margin: 0;
    padding: 1px 0;
}

/* Shuffle/Repeat active state */
.spotify-ctrl-btn.active {
    color: #1db954;
}

.spotify-dropdown-track {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.spotify-dropdown-cover {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.spotify-dropdown-info {
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.spotify-dropdown-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-dropdown-artist {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Transfer playback button */
.spotify-transfer-btn {
    display: block;
    width: 100%;
    padding: 6px 0;
    margin-bottom: 10px;
    background: rgba(29, 185, 84, 0.12);
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: var(--radius-sm);
    color: #1db954;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.spotify-transfer-btn:hover {
    background: rgba(29, 185, 84, 0.2);
    border-color: #1db954;
}

.spotify-dropdown-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.spotify-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.spotify-ctrl-btn:hover {
    color: var(--text-primary);
}

.spotify-ctrl-play {
    width: 36px;
    height: 36px;
    background: #1db954;
    color: #000 !important;
}

.spotify-ctrl-play:hover {
    background: #1ed760;
    transform: scale(1.06);
}

/* Progress bar with draggable thumb */
.spotify-dropdown-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.spotify-time {
    font-size: 0.62rem;
    color: var(--text-muted);
    min-width: 28px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.spotify-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.spotify-progress-bar:hover {
    height: 6px;
}

.spotify-progress-fill {
    height: 100%;
    background: #1db954;
    border-radius: 2px;
    width: 0%;
    pointer-events: none;
    position: relative;
}

.spotify-progress-thumb {
    position: absolute;
    top: 50%;
    right: -5px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
}

.spotify-progress-bar:hover .spotify-progress-thumb,
.spotify-progress-bar.dragging .spotify-progress-thumb {
    opacity: 1;
}

/* Volume */
.spotify-dropdown-footer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.spotify-volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 2px;
    outline: none;
}

.spotify-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1db954;
    cursor: pointer;
}

.spotify-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1db954;
    cursor: pointer;
    border: none;
}

/* Spotify track change toast */
.spotify-toast {
    position: fixed;
    top: 62px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(29, 185, 84, 0.1);
    padding: 10px 14px;
    z-index: 1400;
    max-width: 360px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.spotify-toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.spotify-toast-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.spotify-toast-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.spotify-toast-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1db954;
    margin-bottom: 2px;
}

.spotify-toast-track {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.spotify-toast-close:hover {
    color: var(--text-primary);
}

/* Icon button (sound, etc.) */
.topbar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.topbar-icon-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* User button in topbar */
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition);
    max-width: 200px;
}

.topbar-user-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.topbar-user-avatar {
    flex-shrink: 0;
}

.topbar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-meta {
    display: none;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* User Popover (dropdown from topbar) */
.topbar-user-popover {
    position: fixed;
    top: 56px;
    right: 16px;
    min-width: 190px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    z-index: 1200;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar-user-popover.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.topbar-popover-item {
    display: block;
    padding: 9px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.topbar-popover-item:hover {
    background: var(--bg-tertiary);
    color: var(--gold);
}

.topbar-popover-danger {
    color: var(--red);
}
.topbar-popover-danger:hover {
    color: var(--red);
    background: rgba(239, 68, 68, 0.08);
}

.topbar-popover-spotify {
    color: #1db954;
}
.topbar-popover-spotify:hover {
    color: #1db954;
    background: rgba(29, 185, 84, 0.08);
}

.topbar-popover-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.topbar-popover-presence { width:100%; text-align:left; background:none; border:none; cursor:pointer; font:inherit; color:var(--text-secondary); padding:9px 16px; }
.topbar-popover-presence:hover { background:var(--bg-tertiary); color:var(--gold); }
.topbar-popover-presence.active { color:#ef4444; }

/* Mobile hamburger - hidden on desktop */
.topbar .topbar-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.topbar-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   GAMES PANEL (Lateral sidebar for games)
   ============================================ */
.games-panel {
    position: fixed;
    top: 52px;
    left: 0;
    width: 560px;
    height: calc(100vh - 52px);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 1090;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

.games-panel.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.games-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold);
    flex-shrink: 0;
}

.games-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.games-panel-close:hover {
    color: var(--text-primary);
}

.games-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.games-panel-body::-webkit-scrollbar { width: 4px; }
.games-panel-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.games-panel-group {
    padding: 4px 0;
}
.games-panel-group + .games-panel-group {
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
    padding-top: 8px;
}

.games-panel-heading {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold);
    padding: 4px 4px 6px;
}

.games-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.games-panel-item {
    display: block;
    padding: 7px 10px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 6px;
}

.games-panel-item:hover {
    color: var(--gold);
    background: rgba(212, 160, 23, 0.08);
}

/* ============================================
   MOBILE DRAWER (off-canvas nav)
   ============================================ */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.mobile-drawer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.mobile-drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.mobile-drawer-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    padding: 8px 14px;
    margin: 4px 12px 8px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.mobile-drawer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
}

.mobile-drawer-link:hover,
.mobile-drawer-link.active {
    color: var(--gold);
    background: rgba(212, 160, 23, 0.08);
}

.mobile-drawer-gold {
    color: var(--gold) !important;
}

.mobile-drawer-danger {
    color: var(--red);
}

.mobile-drawer-spotify.connected {
    color: #1db954;
}

.mobile-drawer-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 12px;
}

.mobile-drawer-arrow {
    margin-left: auto;
    transition: transform 0.2s;
}

.mobile-games-toggle.open .mobile-drawer-arrow {
    transform: rotate(180deg);
}

.mobile-games-submenu {
    display: none;
    padding: 0 0 4px 20px;
}

.mobile-games-submenu.open {
    display: block;
}

.mobile-games-group {
    padding: 4px 0;
}

.mobile-games-heading {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold);
    padding: 6px 12px 4px;
}

.mobile-games-item {
    display: block;
    padding: 7px 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.mobile-games-item:hover {
    color: var(--gold);
}

/* Drawer backdrop */
.drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1150;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
    display: block;
    opacity: 1;
}


/* ============================================
   MAIN WRAPPER
   ============================================ */
.main-wrapper {
    margin-top: 52px;
    min-height: calc(100vh - 52px);
    display: flex;
    flex-direction: column;
    transition: margin-top 0.3s ease;
}

/* Keep old common classes that other code might reference */
.brand-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-icon {
    font-size: 0.9rem;
}

.balance-amount {
    color: var(--gold);
}

.user-level {
    font-size: 0.65rem;
    background: var(--gold);
    color: var(--bg-primary);
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 700;
}

.text-danger {
    color: var(--red) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-gold {
    background: var(--gold-gradient);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-gold:hover {
    box-shadow: 0 6px 25px rgba(212, 160, 23, 0.5);
    color: var(--bg-primary);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
}

.btn-outline:hover {
    background: rgba(212, 160, 23, 0.1);
    color: var(--gold-light);
}

.btn-green {
    background: var(--green);
    color: white;
}

.btn-green:hover {
    background: var(--green-dark);
    color: white;
}

.btn-red {
    background: var(--red);
    color: white;
}

.btn-red:hover {
    background: var(--red-dark);
    color: white;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    padding: 120px 0 100px;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center top, rgba(212, 160, 23, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-size: 1rem;
}

/* ============================================
   GAME CARDS (Landing)
   ============================================ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.game-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.game-card-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.game-card-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.game-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.game-card-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.game-card-meta span {
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: var(--radius-xl);
}

/* --- Compact game cards (index page) --- */
.games-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.game-card-compact {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}
.game-card-compact:hover {
    border-color: var(--gold);
    background: var(--bg-tertiary);
    color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}
.game-card-compact .gcc-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}
.game-card-compact .gcc-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-gold);
}

.feature-icon {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-control option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.auth-header h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form {
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-warning {
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.3);
    color: var(--gold-light);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
    flex: 1;
    padding: 32px 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    font-size: 1.6rem;
}

.welcome-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-gold);
}

.stat-icon {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.stat-value.gold {
    color: var(--gold);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Dashboard Games Grid */
.dash-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dash-game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.dash-game-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.dash-game-icon {
    font-size: 2.4rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.dash-game-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.dash-game-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Daily Bonus */
.bonus-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 32px;
}

.bonus-card.claimed {
    border-color: var(--border-color);
    opacity: 0.7;
}

.bonus-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.bonus-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--font-heading);
}

/* ============================================
   PROFILE & HISTORY
   ============================================ */
.page-header {
    padding: 32px 0 0;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.content-card h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.9rem;
}

table th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

table td {
    border-bottom: 1px solid var(--border-color);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: rgba(255,255,255,0.02);
}

table tr:hover td.gold-text,
table tr:hover td .gold-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Amount colors */
.amount-positive {
    color: var(--green);
    font-weight: 600;
}

.amount-negative {
    color: var(--red);
    font-weight: 600;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gold {
    background: rgba(212, 160, 23, 0.15);
    color: var(--gold);
}

.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

/* VIP Badge */
.badge-vip {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.25), rgba(240, 192, 64, 0.25));
    color: var(--gold);
    border: 1px solid rgba(212, 160, 23, 0.4);
    font-weight: 700;
    font-size: 0.65rem;
    padding: 2px 8px;
    letter-spacing: 1.5px;
    text-shadow: 0 0 6px rgba(212, 160, 23, 0.4);
    animation: vipGlow 2s ease-in-out infinite alternate;
}
@keyframes vipGlow {
    from { box-shadow: 0 0 4px rgba(212, 160, 23, 0.2); }
    to { box-shadow: 0 0 12px rgba(212, 160, 23, 0.4); }
}

/* Badges inline (emoji next to username) */
.user-badge { display:inline-block; font-size:0.85rem; vertical-align:middle; margin-left:2px; cursor:default; }
.user-badge-gold { filter: drop-shadow(0 0 3px rgba(212,160,23,0.5)); }
.user-badge-green { filter: drop-shadow(0 0 3px rgba(16,185,129,0.5)); }
.user-badge-blue { filter: drop-shadow(0 0 3px rgba(59,130,246,0.5)); }
.user-badge-purple { filter: drop-shadow(0 0 3px rgba(168,85,247,0.5)); }
.user-badge-red { filter: drop-shadow(0 0 3px rgba(239,68,68,0.5)); }

/* Badges grid (profile.php) */
.badges-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; }
.badge-card { background:var(--bg-card); border:1px solid var(--border-color); border-radius:var(--radius-md); padding:16px; text-align:center; position:relative; transition:border-color .2s, transform .15s; }
.badge-card.badge-earned { cursor:pointer; }
.badge-card.badge-earned:hover { border-color:var(--gold); transform:translateY(-2px); }
.badge-card.badge-locked { opacity:0.4; filter:grayscale(0.8); }
.badge-card.badge-displayed { border-color:var(--gold); background:rgba(212,160,23,0.05); }
.badge-card-icon { display:block; font-size:2rem; margin-bottom:8px; }
.badge-card-name { display:block; font-weight:700; font-size:0.9rem; margin-bottom:4px; }
.badge-card-desc { display:block; font-size:0.78rem; color:var(--text-muted); margin-bottom:8px; }
.badge-card-status { font-size:0.72rem; font-weight:600; text-transform:uppercase; }
.badge-card-check { position:absolute; top:8px; right:8px; color:var(--gold); font-weight:700; font-size:1.1rem; }
.badge-rarity-common { color:var(--text-muted); }
.badge-rarity-rare { color:var(--blue); }
.badge-rarity-epic { color:#a855f7; }
.badge-rarity-legendary { color:var(--gold); text-shadow:0 0 6px rgba(212,160,23,0.4); }
.badge-card-rarity { display:block; font-size:0.68rem; font-weight:600; text-transform:uppercase; margin-top:4px; letter-spacing:0.5px; }

/* VIP Banner */
.vip-banner {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.08), rgba(240, 192, 64, 0.04));
    border: 1px solid rgba(212, 160, 23, 0.25);
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 20px;
}
.vip-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.vip-banner-icon {
    font-size: 1.6rem;
}
.vip-banner-content strong {
    color: var(--gold);
    display: block;
    font-size: 0.95rem;
}
.vip-perks {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Avatar Picker */
.avatar-picker-section {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.avatar-current {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}
.avatar-preview {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
    overflow: hidden;
}
/* Avatar image styles */
.avatar-img-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}
.avatar-img-option {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    pointer-events: none;
}
.avatar-img-nav {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}
.avatar-img-lb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}
.avatar-grid-wrap {
    flex: 1;
}
.avatar-grid-wrap h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 12px 0 8px;
    font-weight: 500;
}
.avatar-grid-wrap h3:first-child {
    margin-top: 0;
}
.avatar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.avatar-option {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.avatar-option:hover:not(.locked) {
    border-color: var(--gold);
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--gold-glow);
}
.avatar-option.selected {
    border-color: var(--gold);
    background: rgba(212, 160, 23, 0.15);
    box-shadow: 0 0 12px var(--gold-glow);
}
.avatar-option.vip-exclusive {
    border-color: #6b21a8;
}
.avatar-option.vip-exclusive:hover:not(.locked) {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}
.avatar-option.vip-exclusive.selected {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}
.avatar-option.locked {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.6);
}
.avatar-lock {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.6rem;
}
.lb-avatar {
    margin-right: 4px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.pagination .active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg-primary);
    font-weight: 700;
}

/* Leaderboard */
.leaderboard-rank {
    font-weight: 700;
    font-size: 1.1rem;
}

.leaderboard-rank.top-1 { color: #ffd700; }
.leaderboard-rank.top-2 { color: #c0c0c0; }
.leaderboard-rank.top-3 { color: #cd7f32; }

/* XP Bar */
.xp-bar-container {
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    height: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.xp-bar {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: var(--radius-xl);
    transition: width 0.5s ease;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-brand .brand-icon {
    font-size: 2rem;
}

.footer-brand .brand-text {
    font-size: 1.1rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 48px;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet: hide secondary nav labels */
@media (max-width: 1200px) {
    .topbar-link span:not(.topbar-link-icon):not(.topbar-badge):not(.topbar-badge-new) {
        display: none;
    }
    .topbar-link { padding: 6px 8px; }
    .topbar-link-arrow { display: none; }
    .games-panel { width: 420px; }
}

@media (max-width: 768px) {
    /* Topbar: compact mobile version */
    .topbar {
        height: 48px;
        padding: 0 10px;
        gap: 8px;
    }

    .topbar-nav { display: none; }

    .topbar .topbar-hamburger {
        display: flex;
    }

    .topbar-brand-text { display: none; }

    .topbar-right .topbar-icon-btn,
    .topbar-right .topbar-spotify,
    .topbar-right .topbar-user-btn .topbar-user-name,
    .topbar-right .topbar-user-btn .topbar-user-meta {
        display: none;
    }

    .topbar-user-btn {
        padding: 4px;
    }

    .main-wrapper {
        margin-top: 48px;
    }

    /* Games panel full width on mobile */
    .games-panel {
        width: 100vw;
        top: 48px;
        height: calc(100vh - 48px);
    }

    .games-panel-grid {
        gap: 4px;
    }
    .games-panel-item {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .topbar-user-popover {
        right: 8px;
        top: 52px;
    }

    /* Spotify dropdown mobile */
    .spotify-dropdown {
        right: -60px;
        width: 280px;
    }
    .spotify-dropdown::before {
        right: 68px;
    }
    .spotify-dropdown-footer { display: none; }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-stat-value {
        font-size: 1.5rem;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 24px;
    }

    .footer {
        padding: 24px 0 0;
    }

    /* Friend rows responsive */
    .friend-row { flex-wrap: wrap; gap: 8px; }
    .friend-actions { width: 100%; justify-content: flex-start; }

    /* Container padding */
    .container { padding: 0 16px; }

    /* Page header */
    .page-header h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }
    .games-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Container padding tighter */
    .container { padding: 0 12px; }

    /* Page header */
    .page-header h1 { font-size: 1.3rem; }
    .page-header p { font-size: 0.85rem; }

    /* Friend row mobile */
    .friend-actions .btn { font-size: 0.75rem; padding: 6px 10px; }

    /* Content cards */
    .content-card { padding: 16px; }

    /* Compact footer on small screens */
    .footer-links {
        gap: 16px;
    }
    .footer-col a {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    .footer-col h4 {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    .footer-brand {
        text-align: center;
    }
}

/* ============================================
   DinoModal — Custom Alert/Confirm
   ============================================ */
.dm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.dm-overlay.dm-active {
    opacity: 1;
    pointer-events: auto;
}

.dm-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.dm-active .dm-modal {
    transform: scale(1) translateY(0);
}

.dm-header {
    padding: 18px 22px 0;
}

.dm-title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gold);
}

.dm-body {
    padding: 14px 22px 18px;
}

.dm-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.dm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 22px 18px;
}

/* ============================================
   NOTIFICATION BADGE
   ============================================ */
.notif-badge {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

/* ============================================
   FRIENDS PAGE
   ============================================ */
.friends-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.friends-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.friends-tab:hover {
    color: var(--gold);
}

.friends-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.friends-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 10px;
    margin-left: 6px;
}

.friends-panel {
    display: none;
}

.friends-panel.active {
    display: block;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.friend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.friend-row:hover {
    background: var(--bg-tertiary);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.friend-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.friend-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.friend-level {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.friend-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.friend-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .friend-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .friend-actions {
        width: 100%;
    }
    .friend-actions .btn {
        flex: 1;
    }
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-switch { position:relative; display:inline-block; width:44px; height:24px; flex-shrink:0; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background:#4b5563; border-radius:24px; transition:0.3s; }
.toggle-slider::before { content:''; position:absolute; height:18px; width:18px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:0.3s; }
.toggle-switch input:checked + .toggle-slider { background:var(--gold, #d4a017); }
.toggle-switch input:checked + .toggle-slider::before { transform:translateX(20px); }

/* ============================================
   CONSENT BANNER + DEBUG OVERLAY
   ============================================ */
.dino-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary, #12121f);
    border-top: 1px solid var(--border-color, #2a2a3a);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

.dino-consent-banner.visible {
    transform: translateY(0);
}

.dino-consent-text {
    font-size: 0.85rem;
    color: var(--text-secondary, #9ca3af);
    flex: 1;
}

.dino-consent-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dino-consent-btn {
    padding: 8px 20px;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.dino-consent-accept {
    background: var(--gold, #d4a017);
    color: #000;
}

.dino-consent-accept:hover {
    background: #e8b52a;
}

.dino-consent-refuse {
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary, #9ca3af);
    border-color: var(--border-color, #2a2a3a);
}

.dino-consent-refuse:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary, #f1f1f1);
}

@media (max-width: 480px) {
    .dino-consent-banner {
        flex-direction: column;
        padding: 14px 16px;
        text-align: center;
    }
    .dino-consent-buttons {
        width: 100%;
    }
    .dino-consent-btn {
        flex: 1;
    }
}

/* ============================================
   CHAT SYSTEM
   ============================================ */

.chat-wrapper {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Sidebar */
.chat-sidebar {
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.chat-conv-list {
    flex: 1;
    overflow-y: auto;
}

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}
.chat-conv-item:hover {
    background: var(--bg-tertiary);
}
.chat-conv-item.active {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--gold);
}

.chat-conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.chat-conv-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-conv-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.chat-conv-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-conv-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.chat-conv-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.chat-conv-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conv-unread {
    background: var(--gold);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
}

.chat-conv-online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
    flex-shrink: 0;
}

/* Main area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    padding: 32px;
}
.chat-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.chat-active {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-back-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.chat-header-avatar {
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.chat-header-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.chat-header-status.online {
    color: var(--green);
}

.chat-header-action {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}
.chat-header-action:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 75%;
}

.chat-msg-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-other {
    align-self: flex-start;
}

.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    max-width: 100%;
    word-break: break-word;
}

.chat-msg-mine .chat-msg-bubble {
    background: var(--gold);
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-msg-other .chat-msg-bubble {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-msg-sender {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 2px;
}

.chat-msg-body {
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-msg-mine .chat-msg-body {
    color: #000;
}

.chat-msg-time {
    font-size: 0.7rem;
    margin-top: 4px;
    text-align: right;
}
.chat-msg-mine .chat-msg-time {
    color: rgba(0,0,0,0.5);
}
.chat-msg-other .chat-msg-time {
    color: var(--text-muted);
}

.chat-msg-system {
    align-self: center;
    max-width: 90%;
    text-align: center;
    padding: 6px 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    background: none;
}

/* ---- Admin Identity Messages ---- */

.chat-msg-admin-identity {
    max-width: 85%;
}

.chat-msg-admin-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid;
}

.chat-msg-admin-sender {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Nouveautes identity (blue) */
.chat-msg-admin-nouveautes .chat-msg-admin-icon {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.4);
}
.chat-msg-admin-nouveautes .chat-msg-bubble {
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-bottom-left-radius: 4px;
}
.chat-msg-admin-nouveautes .chat-msg-admin-sender {
    color: #60a5fa;
}

/* Support identity (green) */
.chat-msg-admin-support .chat-msg-admin-icon {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
}
.chat-msg-admin-support .chat-msg-bubble {
    background: rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-bottom-left-radius: 4px;
}
.chat-msg-admin-support .chat-msg-admin-sender {
    color: #4caf50;
}

/* Informations Importantes identity (amber) */
.chat-msg-admin-informations .chat-msg-admin-icon {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}
.chat-msg-admin-informations .chat-msg-bubble {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-bottom-left-radius: 4px;
}
.chat-msg-admin-informations .chat-msg-admin-sender {
    color: #f59e0b;
}

/* Custom identity (purple) */
.chat-msg-admin-custom .chat-msg-admin-icon {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.4);
}
.chat-msg-admin-custom .chat-msg-bubble {
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-bottom-left-radius: 4px;
}
.chat-msg-admin-custom .chat-msg-admin-sender {
    color: #a78bfa;
}

/* Admin identity badge in conversation sidebar */
.chat-conv-admin-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
}

.chat-conv-admin-nouveautes {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}
.chat-conv-admin-support {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}
.chat-conv-admin-informations {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.chat-conv-admin-custom {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}

/* Sidebar badges for role/adjustment identities */
.chat-conv-admin-role_assignment {
    background: rgba(212, 160, 23, 0.15);
    color: var(--gold);
}
.chat-conv-admin-account_adjustment {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

/* Header badge for admin identity */
.chat-header-admin-identity {
    color: var(--gold) !important;
    font-weight: 600;
    font-size: 0.75rem;
}

/* --- Role assignment notification card --- */
.chat-role-card {
    border-radius: 14px;
    padding: 18px 20px;
    max-width: 360px;
    position: relative;
    overflow: hidden;
}
.chat-role-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    opacity: 0.07;
    pointer-events: none;
}
.chat-role-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1;
}
.chat-role-body {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-line;
}
.chat-role-body br + br { display: none; }

/* VIP variant (gold) */
.chat-role-vip {
    background: linear-gradient(135deg, rgba(212,160,23,0.12), rgba(212,160,23,0.04));
    border: 1px solid rgba(212,160,23,0.3);
    box-shadow: 0 0 20px rgba(212,160,23,0.08);
}
.chat-role-vip .chat-role-icon { text-shadow: 0 0 12px rgba(212,160,23,0.5); }

/* VIP+ variant (diamond blue) */
.chat-role-vip-plus {
    background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(167,139,250,0.06));
    border: 1px solid rgba(59,130,246,0.3);
    box-shadow: 0 0 20px rgba(59,130,246,0.08);
}
.chat-role-vip-plus .chat-role-icon { text-shadow: 0 0 12px rgba(59,130,246,0.5); }

/* Ambassador variant (purple/gold) */
.chat-role-ambassador {
    background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(212,160,23,0.06));
    border: 1px solid rgba(139,92,246,0.3);
    box-shadow: 0 0 20px rgba(139,92,246,0.08);
}
.chat-role-ambassador .chat-role-icon { text-shadow: 0 0 12px rgba(139,92,246,0.5); }

/* Removed variant (muted) */
.chat-role-removed {
    background: rgba(107,114,128,0.08);
    border: 1px solid rgba(107,114,128,0.2);
}

/* --- Account adjustment notification card --- */
.chat-adjust-card {
    border-radius: 14px;
    padding: 16px 20px;
    max-width: 320px;
}
.chat-adjust-icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
    line-height: 1;
}
.chat-adjust-body {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-line;
}

/* Credit variant (green/gold) */
.chat-adjust-credit {
    background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(212,160,23,0.05));
    border: 1px solid rgba(16,185,129,0.25);
}
/* Debit variant (red) */
.chat-adjust-debit {
    background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(239,68,68,0.03));
    border: 1px solid rgba(239,68,68,0.2);
}
/* XP credit variant (blue) */
.chat-adjust-xp {
    background: linear-gradient(135deg, rgba(96,165,250,0.1), rgba(167,139,250,0.05));
    border: 1px solid rgba(96,165,250,0.25);
}
/* XP debit variant */
.chat-adjust-xp-debit {
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(239,68,68,0.04));
    border: 1px solid rgba(245,158,11,0.2);
}

/* Compose bar */
.chat-compose {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-compose input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.chat-compose input:focus {
    border-color: var(--gold);
}

.chat-compose .btn {
    flex-shrink: 0;
}

/* Friend checkboxes for group creation */
.chat-friend-checks {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-friend-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.chat-friend-check:hover {
    background: var(--bg-tertiary);
}
.chat-friend-check img {
    border-radius: var(--radius-sm);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chat-wrapper {
        height: calc(100vh - 140px);
    }

    .chat-sidebar {
        width: 100%;
        min-width: 100%;
    }

    .chat-main {
        width: 100%;
    }

    .chat-sidebar.hidden {
        display: none;
    }
    .chat-main.hidden {
        display: none;
    }

    .chat-back-btn {
        display: inline-flex;
    }

    .chat-msg {
        max-width: 85%;
    }

    .chat-compose input { font-size: 16px; } /* Prevent iOS zoom */
}

@media (max-width: 480px) {
    .chat-wrapper { height: calc(100vh - 140px); }
    .chat-msg { max-width: 90%; }
    .chat-msg-bubble { padding: 8px 10px; font-size: 0.85rem; }
    .chat-compose { padding: 8px 12px; }
    .chat-compose input { padding: 8px 10px; }
    .chat-header { padding: 10px 12px; }
}

/* ============================================
   HERO SECTION — Enhanced
   ============================================ */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.hero-particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: heroParticle 6s linear infinite;
}
.hero-particles span:nth-child(1) { left: 10%; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 25%; animation-delay: 1s; }
.hero-particles span:nth-child(3) { left: 40%; animation-delay: 2s; }
.hero-particles span:nth-child(4) { left: 55%; animation-delay: 0.5s; }
.hero-particles span:nth-child(5) { left: 70%; animation-delay: 3s; }
.hero-particles span:nth-child(6) { left: 85%; animation-delay: 1.5s; }
.hero-particles span:nth-child(7) { left: 95%; animation-delay: 4s; }
.hero-particles span:nth-child(8) { left: 5%; animation-delay: 2.5s; }

@keyframes heroParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

/* ============================================
   GAMES SECTION — Index page filters
   ============================================ */
.games-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.games-search {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}
.games-search:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}
.games-search::placeholder {
    color: var(--text-muted);
}

.games-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.games-tab {
    padding: 8px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.games-tab:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.games-tab.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg-primary);
    font-weight: 600;
}

.games-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 16px;
    text-align: center;
}

/* Game card lock overlay */
.game-card-compact.gcc-locked {
    opacity: 0.55;
    position: relative;
}
.game-card-compact.gcc-locked::after {
    content: '🔒';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.75rem;
}

/* Game card NEW badge */
.gcc-badge-new {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--green);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.game-card-compact {
    position: relative;
}

/* ============================================
   FEATURES — Glassmorphism
   ============================================ */
.feature-card-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.feature-card-glass:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}
.feature-card-glass .feature-icon {
    transition: transform 0.3s ease;
}
.feature-card-glass:hover .feature-icon {
    transform: scale(1.15);
}

/* ============================================
   DASHBOARD — Glassmorphism stat cards
   ============================================ */
.stat-card-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-card-glass:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-gold);
    box-shadow: 0 0 20px rgba(212, 160, 23, 0.1);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.quick-action-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.quick-action-link:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 160, 23, 0.05);
    transform: translateY(-2px);
}
.quick-action-icon {
    font-size: 1.1rem;
}
.quick-action-badge {
    background: var(--gold);
    color: var(--bg-primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Bonus card pulse */
.bonus-card:not(.claimed) .btn-gold {
    animation: bonusPulse 2s ease-in-out infinite;
}
@keyframes bonusPulse {
    0%, 100% { box-shadow: 0 4px 15px var(--gold-glow); }
    50% { box-shadow: 0 4px 30px rgba(212, 160, 23, 0.5); }
}

/* VIP banner animated gradient */
.vip-banner-animated {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.08), rgba(240, 192, 64, 0.04), rgba(212, 160, 23, 0.08));
    background-size: 200% 200%;
    animation: vipGradientShift 4s ease-in-out infinite;
}
@keyframes vipGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Dashboard recent activity badges */
.badge-slots { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.badge-table { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.badge-mini { background: rgba(16, 185, 129, 0.12); color: #34d399; }

/* Dashboard games counter */
.dash-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dash-cat-header h2 {
    font-size: 1.3rem;
    margin: 0;
    border: none;
    padding: 0;
}
.dash-cat-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 3px 10px;
    border-radius: var(--radius-xl);
}

/* ============================================
   QUESTS — 3-Column Layout
   ============================================ */
.quests-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.quests-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quests-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 4px;
}
.quests-column-header h2 {
    font-size: 1rem;
    margin: 0;
    flex: 1;
}
.quests-column-header .quests-col-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Quest card transition for reorder */
.quest-card {
    transition: all 0.3s ease, opacity 0.3s ease;
}
.quest-card.claiming {
    opacity: 0.5;
    transform: scale(0.98);
    pointer-events: none;
}

@media (max-width: 900px) {
    .quests-3col {
        grid-template-columns: 1fr;
    }
    /* On mobile: daily first, then weekly, then permanent */
    .quests-col-daily { order: 1; }
    .quests-col-weekly { order: 2; }
    .quests-col-permanent { order: 3; }
}

/* ============================================
   ANALYTICS ADMIN — Empty data messages
   ============================================ */
.analytics-empty-msg {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.analytics-empty-msg .analytics-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}
.analytics-empty-msg .analytics-empty-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0.7;
}
.analytics-heatmap-notice {
    padding: 10px 14px;
    background: rgba(212, 160, 23, 0.08);
    border: 1px solid rgba(212, 160, 23, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--gold-light);
    margin-bottom: 16px;
}

/* ============================================
   STREAK / FLAME SYSTEM
   ============================================ */

/* Streak badge compact (player profile hero) */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.82rem;
    color: #fff;
}

/* Streak badge small (sidebar) */
.streak-badge-sm {
    font-size: 0.72rem;
    color: #ff6b00;
    font-weight: 700;
    margin-left: 4px;
}

/* Dashboard banner row (role + streak side by side) */
.dash-banner-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .dash-banner-row {
        flex-direction: column;
    }
    .dash-banner-row > * {
        margin-bottom: 0 !important;
    }
}

/* Streak card (dashboard) */
.streak-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.12), rgba(255, 149, 0, 0.06));
    border: 1px solid rgba(255, 107, 0, 0.25);
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 16px;
}

.streak-flame-lg {
    font-size: 2.5rem;
    line-height: 1;
}

.streak-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ff9500;
}

.streak-unit {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.streak-details {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Flame pulse animation */
@keyframes flamePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(255, 107, 0, 0.3)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(255, 107, 0, 0.7)); }
}

.streak-flame-animated {
    animation: flamePulse 1.5s ease-in-out infinite;
    display: inline-block;
}

/* Streak profile card */
.streak-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px;
    background: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 14px;
    text-align: center;
}

@media (max-width: 640px) {
    .streak-card {
        padding: 12px 16px;
        gap: 12px;
    }
    .streak-flame-lg {
        font-size: 2rem;
    }
    .streak-value {
        font-size: 1.5rem;
    }
}

/* Game invite card in chat */
.chat-invite-card {
    background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(59,130,246,0.04));
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 14px;
    padding: 14px 18px;
    max-width: 280px;
    text-align: center;
}
.chat-invite-header {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 10px;
}
.chat-invite-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 6px;
}
.chat-invite-join {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}
.chat-invite-join:hover {
    filter: brightness(1.1);
}
.chat-invite-expired {
    background: var(--bg-tertiary, #2a2a3e);
    color: var(--text-muted, #888);
    cursor: default;
}
/* Admin game promo — "Jouer !" button */
.chat-game-promo-action {
    margin-top: 10px;
    margin-bottom: 4px;
}
.chat-game-promo-btn {
    display: inline-block;
    padding: 9px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #d4a017, #b8900f);
    box-shadow: 0 2px 8px rgba(212,160,23,0.3);
    transition: filter 0.15s, transform 0.15s;
}
.chat-game-promo-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}
.chat-game-promo-btn:active {
    transform: translateY(0);
}
a.chat-msg-sender {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}
a.chat-msg-sender:hover {
    color: var(--gold);
    text-decoration: underline;
}
.chat-header-name[style*="cursor: pointer"]:hover,
.chat-header-name[style*="cursor:pointer"]:hover {
    color: var(--gold);
}

/* ============================================
   PRESENCE SYSTEM
   ============================================ */
.nav-presence-dot { position:absolute; bottom:-1px; right:-1px; width:10px; height:10px; border-radius:50%; border:2px solid var(--bg-secondary); z-index:2; }
.nav-presence-online  { background:#10b981; box-shadow:0 0 5px rgba(16,185,129,0.5); }
.nav-presence-away    { background:#f59e0b; }
.nav-presence-dnd     { background:#ef4444; }
.nav-presence-offline { background:#4b5563; }

/* Legacy: kept for compat */

/* Friend list presence bubble on avatar */
.friend-avatar-wrap { position:relative; flex-shrink:0; display:inline-block; }
.friend-presence-bubble { position:absolute; bottom:0; right:0; width:12px; height:12px; border-radius:50%; border:2px solid var(--bg-card); z-index:2; background:#4b5563; }
.friend-presence-bubble.presence-online  { background:#10b981; box-shadow:0 0 6px rgba(16,185,129,0.6); }
.friend-presence-bubble.presence-away    { background:#f59e0b; box-shadow:0 0 6px rgba(245,158,11,0.4); }
.friend-presence-bubble.presence-dnd     { background:#ef4444; box-shadow:0 0 6px rgba(239,68,68,0.4); }

/* Inline friend presence dots (legacy) */
.friend-presence-dot { display:inline-block; width:8px; height:8px; border-radius:50%; }
.friend-presence-dot.presence-online  { background:#10b981; box-shadow:0 0 6px rgba(16,185,129,0.6); }
.friend-presence-dot.presence-away    { background:#f59e0b; box-shadow:0 0 6px rgba(245,158,11,0.4); }
.friend-presence-dot.presence-dnd     { background:#ef4444; box-shadow:0 0 6px rgba(239,68,68,0.4); }

/* Player profile presence status classes */
.pp-online.status-online  { background:#10b981; box-shadow:0 0 8px rgba(16,185,129,0.5); }
.pp-online.status-away    { background:#f59e0b; box-shadow:0 0 8px rgba(245,158,11,0.4); }
.pp-online.status-dnd     { background:#ef4444; box-shadow:0 0 8px rgba(239,68,68,0.4); }
.pp-online.status-offline { background:#4b5563; }

/* Chat presence dot */
.chat-conv-presence { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; }
.chat-conv-presence.presence-online  { background:#10b981; box-shadow:0 0 6px rgba(16,185,129,0.6); }
.chat-conv-presence.presence-away    { background:#f59e0b; }
.chat-conv-presence.presence-dnd     { background:#ef4444; }

/* ============================================
   AMBASSADOR BADGE
   ============================================ */
.badge-ambassador {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid;
    vertical-align: middle;
}
.badge-ambassador-violet {
    background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(167,139,250,0.15));
    color: #a78bfa;
    border-color: rgba(139,92,246,0.4);
    text-shadow: 0 0 8px rgba(139,92,246,0.3);
}
.badge-ambassador-rose {
    background: linear-gradient(135deg, rgba(236,72,153,0.25), rgba(244,114,182,0.15));
    color: #f472b6;
    border-color: rgba(236,72,153,0.4);
    text-shadow: 0 0 8px rgba(236,72,153,0.3);
}
.badge-ambassador-bleu {
    background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(96,165,250,0.15));
    color: #60a5fa;
    border-color: rgba(59,130,246,0.4);
    text-shadow: 0 0 8px rgba(59,130,246,0.3);
}
.badge-ambassador-emeraude {
    background: linear-gradient(135deg, rgba(16,185,129,0.25), rgba(52,211,153,0.15));
    color: #34d399;
    border-color: rgba(16,185,129,0.4);
    text-shadow: 0 0 8px rgba(16,185,129,0.3);
}
.badge-ambassador-or {
    background: linear-gradient(135deg, rgba(212,160,23,0.3), rgba(240,192,64,0.15));
    color: #f0c040;
    border-color: rgba(212,160,23,0.5);
    text-shadow: 0 0 8px rgba(212,160,23,0.4);
    box-shadow: 0 0 12px rgba(212,160,23,0.15);
}

/* Ambassador badge compact in topbar */
.topbar-user-meta .badge-ambassador {
    font-size: 0.6rem;
    padding: 1px 6px;
    letter-spacing: 0.3px;
}
