/* ============================================
   OTB Games Hub — Launcher Styles
   ============================================ */

/* ====== Profile Selection Screen ====== */
#profile-select {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--otb-bg-primary);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Floating game emoji background */
.profile-floating-emojis {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.profile-floating-emoji {
    position: absolute;
    font-size: 2rem;
    opacity: 0.12;
    animation: profileEmojiDrift linear infinite;
    will-change: transform;
}
.profile-floating-emoji:nth-child(1) { left: 5%; font-size: 2.2rem; animation-duration: 18s; animation-delay: 0s; }
.profile-floating-emoji:nth-child(2) { left: 20%; font-size: 1.6rem; animation-duration: 22s; animation-delay: -4s; }
.profile-floating-emoji:nth-child(3) { left: 38%; font-size: 2.4rem; animation-duration: 20s; animation-delay: -8s; }
.profile-floating-emoji:nth-child(4) { left: 55%; font-size: 1.8rem; animation-duration: 24s; animation-delay: -2s; }
.profile-floating-emoji:nth-child(5) { left: 72%; font-size: 2rem;   animation-duration: 19s; animation-delay: -10s; }
.profile-floating-emoji:nth-child(6) { left: 88%; font-size: 1.5rem; animation-duration: 21s; animation-delay: -6s; }

@keyframes profileEmojiDrift {
    0%   { transform: translateY(110vh) rotate(0deg); }
    100% { transform: translateY(-10vh) rotate(360deg); }
}

/* Content sits above floating emojis */
.profile-select-header,
.profile-cards,
.profile-add-btn {
    position: relative;
    z-index: 1;
}

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

/* Logo golden glow pulse */
.profile-select-logo {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    margin-bottom: 16px;
    animation: logoGoldenPulse 3s ease-in-out infinite;
}
@keyframes logoGoldenPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255,215,0,0.2), 0 0 24px rgba(255,215,0,0.1); }
    50%      { box-shadow: 0 0 20px rgba(255,215,0,0.45), 0 0 40px rgba(255,215,0,0.2); }
}

/* Title fade-in scale animation */
.profile-select-title {
    font-family: var(--otb-font-heading);
    color: var(--otb-text);
    font-size: 2rem;
    animation: titleFadeScale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes titleFadeScale {
    0%   { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.profile-cards {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Profile card shimmer + glow */
.profile-card {
    background: linear-gradient(135deg, var(--otb-bg-secondary), var(--otb-bg-tertiary));
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 32px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
    overflow: hidden;
    animation: profileCardIn 0.6s ease-out both;
}
.profile-card:nth-child(2) { animation-delay: 0.15s; }
.profile-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes profileCardIn {
    0%   { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shimmer sweep across card */
.profile-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,215,0,0.06) 50%, transparent 100%);
    animation: cardShimmer 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cardShimmer {
    0%, 100% { left: -100%; }
    50%      { left: 100%; }
}

/* Subtle resting glow */
.profile-card {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 8px rgba(255,215,0,0.05);
}

.profile-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--otb-coin);
    box-shadow: 0 16px 40px rgba(255,215,0,0.25), 0 0 20px rgba(255,215,0,0.15);
}
.profile-card:active {
    transform: scale(0.95);
}
.profile-card-avatar {
    font-size: 4rem;
    margin-bottom: 12px;
    display: block;
}
.profile-card-name {
    font-family: var(--otb-font-heading);
    color: var(--otb-text);
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.profile-card-stats {
    color: var(--otb-text-muted);
    font-size: 0.85rem;
}
.profile-add-btn {
    margin-top: 24px;
    opacity: 0.7;
}

/* Sparkle particles around profile cards */
.profile-sparkle-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}
.profile-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--otb-coin);
    opacity: 0;
    animation: sparkleFloat 3s ease-in-out infinite;
}
.profile-sparkle:nth-child(1) { top: 30%; left: 15%; animation-delay: 0s; }
.profile-sparkle:nth-child(2) { top: 50%; left: 80%; animation-delay: 0.8s; }
.profile-sparkle:nth-child(3) { top: 20%; left: 60%; animation-delay: 1.6s; width: 3px; height: 3px; }
.profile-sparkle:nth-child(4) { top: 70%; left: 35%; animation-delay: 2.2s; }
.profile-sparkle:nth-child(5) { top: 40%; left: 90%; animation-delay: 0.4s; width: 3px; height: 3px; }
.profile-sparkle:nth-child(6) { top: 60%; left: 10%; animation-delay: 1.2s; }
.profile-sparkle:nth-child(7) { top: 25%; left: 45%; animation-delay: 1.8s; width: 5px; height: 5px; }
.profile-sparkle:nth-child(8) { top: 75%; left: 70%; animation-delay: 2.6s; }

@keyframes sparkleFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0); }
    20%  { opacity: 0.8; transform: translateY(-8px) scale(1); }
    40%  { opacity: 1; transform: translateY(-16px) scale(1.2); }
    60%  { opacity: 0.6; transform: translateY(-24px) scale(0.8); }
    100% { opacity: 0; transform: translateY(-36px) scale(0); }
}

/* ====== Profile Switcher in Header ====== */
.hub-profile-switch {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--otb-text-muted);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s;
}
.hub-profile-switch:hover {
    border-color: var(--otb-coin);
    color: var(--otb-text);
}

/* ====== Add Player Modal ====== */
.add-player-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.add-player-card {
    background: var(--otb-bg-secondary);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    min-width: 320px;
    max-width: 90vw;
}
.add-player-title {
    font-family: var(--otb-font-heading);
    color: var(--otb-text);
    font-size: 1.5rem;
    margin-bottom: 20px;
}
.add-player-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.15);
    background: var(--otb-bg-primary);
    color: var(--otb-text);
    font-family: var(--otb-font-body);
    font-size: 1.1rem;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.add-player-input:focus {
    border-color: var(--otb-coin);
}
.add-player-avatars {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}
.avatar-option {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    background: var(--otb-bg-tertiary);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-option:hover {
    border-color: var(--otb-coin);
    transform: scale(1.1);
}
.avatar-option.selected {
    border-color: var(--otb-coin);
    background: rgba(255,215,0,0.15);
    box-shadow: 0 0 12px rgba(255,215,0,0.3);
}
.add-player-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: var(--otb-font-body);
    background: var(--otb-bg-primary);
    color: var(--otb-text);
    -webkit-overflow-scrolling: touch;
}

/* Subtle hex grid pattern + color gradients */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(233, 69, 96, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(74, 143, 63, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(155, 89, 182, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: hub-bg-shift 20s ease-in-out infinite alternate;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

@keyframes hub-bg-shift {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

#hub {
    position: relative;
    z-index: 1;
}

/* ============ SPLASH ============ */
.hub-splash-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    animation: hub-icon-bounce 2s ease-in-out infinite;
}

@keyframes hub-icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============ HEADER ============ */
.hub-header {
    background: linear-gradient(180deg, #000 0%, #000 60%, #0a0a1e 100%);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid rgba(255, 215, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 10;
    overflow: hidden;
}
/* Subtle star twinkle dots in header */
.hub-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.5) 50%, transparent 100%),
        radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,0.4) 50%, transparent 100%),
        radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.6) 50%, transparent 100%),
        radial-gradient(1px 1px at 75% 55%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.5) 50%, transparent 100%),
        radial-gradient(1px 1px at 20% 85%, rgba(255,255,255,0.35) 50%, transparent 100%),
        radial-gradient(1px 1px at 65% 80%, rgba(255,255,255,0.4) 50%, transparent 100%),
        radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 45% 45%, rgba(255,215,0,0.4) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 5% 50%, rgba(255,215,0,0.3) 50%, transparent 100%);
    animation: headerTwinkle 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}
.hub-header > * { position: relative; z-index: 1; }
@keyframes headerTwinkle {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

.hub-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.hub-banner-img {
    height: auto;
    width: auto;
    max-width: 500px;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.hub-player {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.hub-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(74, 144, 217, 0.3);
}

.hub-brand-name {
    font-family: var(--otb-font-heading);
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 1px;
}

.hub-player {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.hub-player-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-player-name {
    font-family: var(--otb-font-heading);
    font-size: 1.1rem;
    color: var(--otb-coin);
}

.hub-player-level {
    font-family: var(--otb-font-body);
    font-size: 0.75rem;
    color: var(--otb-text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.hub-xp-bar {
    width: 140px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.hub-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--otb-xp), #c084fc);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.hub-stats-row {
    display: flex;
    gap: 10px;
}

.hub-stat {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Gold coin badge */
#coins-display {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.25);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

/* Fire orange streak badge */
#streak-display {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.12);
    border: 1px solid rgba(255, 107, 53, 0.25);
    text-shadow: 0 0 6px rgba(255, 107, 53, 0.3);
}

/* ============ SECTIONS ============ */
.hub-section {
    padding: 10px 16px;
}

.hub-section-title {
    font-family: var(--otb-font-heading);
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hub-section-title::before {
    content: '\2694';
    font-size: 0.9rem;
    opacity: 0.6;
}
.hub-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,215,0,0.3), transparent);
    margin-left: 4px;
}

/* ============ GAMES GRID ============ */
.hub-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.hub-game-card {
    background: linear-gradient(145deg, var(--otb-bg-secondary), rgba(10,10,30,0.9));
    border: 2px solid var(--card-accent, var(--otb-border));
    border-radius: var(--otb-radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 0 20px var(--card-glow, rgba(255,255,255,0.03));
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Per-game accent hover glow */
.hub-game-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--card-accent, var(--otb-coin));
    box-shadow: 0 12px 32px var(--card-glow, rgba(255, 215, 0, 0.2)), 0 0 16px var(--card-glow, rgba(255, 215, 0, 0.1));
}
#card-thinkfast  { --card-accent: #e94560; --card-glow: rgba(233, 69, 96, 0.3); }
#card-wordmine   { --card-accent: #4a8f3f; --card-glow: rgba(74, 143, 63, 0.3); }
#card-rhythmblast { --card-accent: #a855f7; --card-glow: rgba(168, 85, 247, 0.3); }
#card-potionlab  { --card-accent: #ff7518; --card-glow: rgba(255, 117, 24, 0.3); }
#card-creaturecards { --card-accent: #f59e0b; --card-glow: rgba(245, 158, 11, 0.3); }
#card-spideyacademy { --card-accent: #e23636; --card-glow: rgba(226, 54, 54, 0.3); }

.hub-game-card:active {
    transform: translateY(-1px) scale(0.97);
}

.hub-game-banner {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Shimmer sweep across banner images */
.hub-game-banner::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
    animation: bannerShimmer 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes bannerShimmer {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

.hub-game-emoji {
    display: none;
}

.thinkfast-banner {
    background: url('../assets/banner-thinkfast.png') center/cover no-repeat;
}

.wordmine-banner {
    background: url('../assets/banner-wordmine.png') center/cover no-repeat;
}

.rhythmblast-banner {
    background: url('../assets/banner-rhythmblast.png') center/cover no-repeat;
}

.creaturecards-banner {
    background: url('../assets/banner-creaturecards.png') center/cover no-repeat;
}

.potionlab-banner {
    background: url('../assets/banner-potionlab.png') center/cover no-repeat;
}

.spidey-banner {
    background: url('../assets/banner-spidey.png') center/cover no-repeat;
}

.coming-soon-banner {
    background: linear-gradient(135deg, #333 0%, #222 100%);
    opacity: 0.6;
}

.hub-lock-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 1rem;
    opacity: 0.7;
}

.hub-game-info {
    padding: 8px 12px;
}

.hub-game-title {
    font-family: var(--otb-font-heading);
    font-size: 1rem;
    color: #fff;
    margin-bottom: 4px;
}

.hub-game-desc {
    font-family: var(--otb-font-body);
    font-size: 0.75rem;
    color: var(--otb-text-muted);
    margin-bottom: 8px;
}

.hub-game-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hub-game-tag {
    font-family: var(--otb-font-body);
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-math {
    background: rgba(155, 89, 182, 0.2);
    color: #c084fc;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.tag-reading {
    background: rgba(46, 204, 113, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Game card progress bar + last played */
.hub-game-progress {
    margin-top: 6px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}
.hub-game-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--card-accent, var(--otb-coin));
    transition: width 0.6s ease;
}
.hub-game-last-played {
    font-size: 0.6rem;
    color: var(--otb-text-dim);
    margin-top: 4px;
    font-family: var(--otb-font-body);
}

.hub-game-locked {
    opacity: 0.5;
    pointer-events: none;
}

.hub-game-offline {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.hub-game-offline .hub-game-banner::after {
    content: '📡 Offline';
    position: absolute;
    top: 8px;
    right: 8px;
    font-family: var(--otb-font-body);
    font-size: 0.6rem;
    background: rgba(0,0,0,0.6);
    color: var(--otb-warning);
    padding: 2px 8px;
    border-radius: 8px;
}

/* ============ ACHIEVEMENTS ============ */
.hub-achievements {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hub-achievement {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--otb-border);
    border-radius: var(--otb-radius-md);
    padding: 10px 14px;
}

.hub-achievement-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.hub-achievement-info {
    flex: 1;
}

.hub-achievement-name {
    font-family: var(--otb-font-heading);
    font-size: 0.8rem;
    color: var(--otb-coin);
}

.hub-achievement-desc {
    font-family: var(--otb-font-body);
    font-size: 0.65rem;
    color: var(--otb-text-muted);
    margin-top: 2px;
}

.hub-achievement-source {
    font-family: var(--otb-font-body);
    font-size: 0.55rem;
    color: var(--otb-text-dim);
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 6px;
}

.hub-empty-state {
    font-family: var(--otb-font-body);
    font-size: 0.85rem;
    color: var(--otb-text-dim);
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--otb-radius-md);
    border: 1px dashed var(--otb-border);
}

/* ============ PROGRESS ============ */
.hub-progress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hub-progress-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--otb-border);
    border-radius: var(--otb-radius-md);
    padding: 12px 16px;
}

.hub-progress-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.hub-progress-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hub-progress-label {
    font-family: var(--otb-font-heading);
    font-size: 0.85rem;
    color: #fff;
}

.hub-progress-pct {
    font-family: var(--otb-font-body);
    font-size: 0.7rem;
    color: var(--otb-coin);
    font-weight: 700;
}

.hub-total-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--otb-border);
}

.hub-total-stat {
    font-family: var(--otb-font-body);
    font-size: 0.75rem;
    color: var(--otb-text-muted);
}

/* ============ FOOTER ============ */
/* Daily Challenges distinct background */
.hub-section-challenges {
    background: linear-gradient(135deg, rgba(255,215,0,0.04), rgba(155,89,182,0.04));
    border-top: 1px solid rgba(255,215,0,0.1);
    border-bottom: 1px solid rgba(255,215,0,0.1);
    margin: 4px 0;
    border-radius: 8px;
}

.hub-footer {
    text-align: center;
    padding: 6px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.6rem;
    opacity: 0.4;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
    .hub-games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .hub-game-banner { height: 80px; }
    .hub-header {
        padding: 6px 12px;
    }
    .hub-section {
        padding: 8px 12px;
    }
}

/* Fire tablet (1024x600) sweet spot: 3 columns, bigger cards */
@media (min-width: 768px) and (max-width: 1100px) {
    .hub-games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .hub-game-banner { height: 110px; }
    .hub-game-info { padding: 8px 12px; }
    .hub-game-desc { margin-bottom: 4px; }
    .hub-section { padding: 8px 16px; }
    .hub-section-title { margin-bottom: 6px; font-size: 0.95rem; }
}

@media (min-width: 1100px) {
    .hub-games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============ ANIMATIONS ============ */
.hub-game-card {
    animation: hub-card-in 0.4s ease-out both;
}

.hub-game-card:nth-child(1) { animation-delay: 0.1s; }
.hub-game-card:nth-child(2) { animation-delay: 0.2s; }
.hub-game-card:nth-child(3) { animation-delay: 0.3s; }
.hub-game-card:nth-child(4) { animation-delay: 0.4s; }
.hub-game-card:nth-child(5) { animation-delay: 0.5s; }
.hub-game-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes hub-card-in {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ MUSIC TOGGLE ============ */
.hub-music-toggle {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.hub-music-toggle:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.1);
}
.hub-music-toggle:active {
    transform: scale(0.95);
}

/* ============ DAILY LOGIN BONUS ============ */
.login-bonus-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: loginFadeIn 0.3s ease-out;
}
.login-bonus-overlay.login-bonus-fadeout {
    animation: loginFadeOut 0.4s ease-in forwards;
}
.login-bonus-card {
    background: linear-gradient(135deg, var(--otb-bg-secondary), var(--otb-bg-tertiary));
    border: 2px solid var(--otb-coin);
    border-radius: 16px;
    padding: 28px 36px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    animation: bonusPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3), 0 8px 32px rgba(0,0,0,0.5);
}
.login-bonus-emoji {
    font-size: 3rem;
    margin-bottom: 8px;
    animation: bonusBounce 0.6s ease-out 0.3s both;
}
.login-bonus-message {
    font-family: var(--otb-font-heading);
    font-size: 1.4rem;
    color: var(--otb-coin);
    margin-bottom: 4px;
}
.login-bonus-streak {
    font-family: var(--otb-font-body);
    font-size: 0.85rem;
    color: var(--otb-text-muted);
    margin-bottom: 16px;
}
.login-bonus-rewards {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 20px;
}
.login-bonus-reward {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: rewardSlideUp 0.5s ease-out 0.5s both;
}
.login-bonus-reward-icon {
    font-size: 1.6rem;
}
.login-bonus-reward-amount {
    font-family: var(--otb-font-heading);
    font-size: 1.3rem;
    color: var(--otb-text);
}
.login-bonus-reward-label {
    font-size: 0.75rem;
    color: var(--otb-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.login-bonus-collect {
    font-size: 1rem;
    padding: 10px 40px;
    animation: rewardSlideUp 0.5s ease-out 0.7s both;
}

@keyframes loginFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes loginFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes bonusPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes bonusBounce {
    0% { transform: scale(0) rotate(-20deg); }
    60% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes rewardSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
