/* ============================================
   OTB Games Hub — Feature Styles
   Coin Shop, Trophies, Challenges, Progress Map,
   Animations, Report Card, Virtual Pet
   ============================================ */

/* ============ NAV TABS ============ */
.hub-nav {
    display: flex;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

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

.hub-nav-tab {
    font-family: var(--otb-font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 8px 18px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
}

.hub-nav-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
}

.hub-nav-tab.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 180, 0, 0.08));
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.2), 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.hub-nav-tab .tab-icon {
    font-size: 1rem;
}

.hub-tab-content {
    display: none;
    padding: 4px 8px;
    animation: tabFadeIn 0.3s ease;
}

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

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ AVATAR IN HEADER ============ */
.hub-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--otb-bg-tertiary), rgba(255,215,0,0.1));
    border: 3px solid var(--otb-coin);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3), 0 0 24px rgba(255, 215, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    animation: avatarPulse 3s ease-in-out infinite;
}
@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.3), 0 0 24px rgba(255, 215, 0, 0.1); }
    50% { box-shadow: 0 0 16px rgba(255, 215, 0, 0.5), 0 0 32px rgba(255, 215, 0, 0.15); }
}

.hub-player-title {
    font-family: var(--otb-font-body);
    font-size: 0.6rem;
    color: var(--otb-text-muted);
    letter-spacing: 0.5px;
}

.hub-player-name.rainbow {
    background: linear-gradient(90deg, #f44, #f90, #ff0, #4f4, #4ff, #44f, #f4f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 3s linear infinite;
    background-size: 200% 100%;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ============ COIN SHOP ============ */
.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.shop-title {
    font-family: var(--otb-font-heading);
    font-size: 1.2rem;
    color: #fff;
}

.shop-coins {
    font-family: var(--otb-font-heading);
    font-size: 1.1rem;
    color: var(--otb-coin);
    background: rgba(255, 215, 0, 0.1);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.shop-category {
    margin-bottom: 20px;
}

.shop-category-title {
    font-family: var(--otb-font-heading);
    font-size: 0.9rem;
    color: var(--otb-text-muted);
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--otb-border);
}

.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--otb-border);
    border-radius: var(--otb-radius-md);
    padding: 12px 8px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.shop-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.shop-item.equipped {
    border-color: var(--otb-coin);
    background: rgba(255, 215, 0, 0.06);
}

.shop-item-visual {
    font-size: 2rem;
    display: block;
    margin-bottom: 6px;
    min-height: 40px;
    line-height: 40px;
}

.shop-rainbow-text {
    font-family: var(--otb-font-heading);
    background: linear-gradient(90deg, #f44, #f90, #ff0, #4f4, #4ff, #44f, #f4f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shop-title-preview {
    font-family: var(--otb-font-body);
    font-size: 0.7rem !important;
    color: var(--otb-coin);
}

.shop-item-name {
    font-family: var(--otb-font-heading);
    font-size: 0.75rem;
    color: #fff;
    margin-bottom: 2px;
}

.shop-item-desc {
    font-family: var(--otb-font-body);
    font-size: 0.6rem;
    color: var(--otb-text-dim);
    margin-bottom: 8px;
}

.shop-btn {
    font-family: var(--otb-font-body);
    font-weight: 700;
    font-size: 0.65rem;
    border: none;
    border-radius: 12px;
    padding: 5px 12px;
    cursor: pointer;
    transition: transform 0.1s, filter 0.1s;
}

.shop-btn:active { transform: scale(0.92); }

.shop-btn-buy {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
}

.shop-btn-equip {
    background: linear-gradient(135deg, var(--otb-bg-tertiary), #4A90D9);
    color: #fff;
}

.shop-btn-equipped {
    background: rgba(255, 215, 0, 0.2);
    color: var(--otb-coin);
    cursor: default;
}

.shop-btn-locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--otb-text-dim);
    cursor: not-allowed;
    opacity: 0.5;
}

/* ============ TROPHY ROOM ============ */
.trophy-header {
    text-align: center;
    margin-bottom: 20px;
}
.trophy-count {
    font-family: var(--otb-font-heading);
    color: var(--otb-coin);
    font-size: 1.5rem;
}
.trophy-progress {
    width: 200px;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin: 8px auto;
    overflow: hidden;
}
.trophy-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--otb-coin), #ff8c00);
    border-radius: 4px;
}
.trophy-game-section {
    margin-bottom: 20px;
}
.trophy-game-title {
    font-family: var(--otb-font-heading);
    color: var(--otb-text);
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.trophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.trophy-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s;
}
.trophy-item.earned {
    border-color: rgba(255,215,0,0.3);
    animation: trophyShimmer 3s ease-in-out infinite;
}
.trophy-item.earned:hover {
    transform: scale(1.05);
    border-color: var(--otb-coin);
}
.trophy-item.locked {
    opacity: 0.4;
}
.trophy-icon { font-size: 2rem; margin-bottom: 6px; }
.trophy-name { font-size: 0.75rem; color: var(--otb-text); font-weight: 600; }
.trophy-desc { font-size: 0.65rem; color: var(--otb-text-muted); margin-top: 4px; }
@keyframes trophyShimmer {
    0%, 100% { box-shadow: 0 0 0 rgba(255,215,0,0); }
    50% { box-shadow: 0 0 12px rgba(255,215,0,0.15); }
}

/* ============ DAILY CHALLENGES (compact pill row) ============ */
.challenges-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.challenges-title {
    font-family: var(--otb-font-heading);
    font-size: 0.85rem;
    color: #fff;
}

.challenge-timer-inline {
    font-family: var(--otb-font-body);
    font-size: 0.65rem;
    color: var(--otb-text-muted);
}

.challenges-complete {
    font-family: var(--otb-font-body);
    font-size: 0.7rem;
    color: var(--otb-success);
    font-weight: 700;
}

.challenges-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.challenges-pills::-webkit-scrollbar { display: none; }

.challenge-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(22,33,62,0.9), rgba(15,52,96,0.6));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 6px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
    transition: all 0.2s;
    min-width: 0;
}
.challenge-pill:nth-child(1) { border-left: 3px solid #e94560; }
.challenge-pill:nth-child(2) { border-left: 3px solid #a855f7; }
.challenge-pill:nth-child(3) { border-left: 3px solid #4a8f3f; }

.challenge-pill.completed {
    border-color: var(--otb-coin);
    background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(22,33,62,0.9));
}

.challenge-pill-icon {
    font-size: 1rem;
    flex-shrink: 0;
}
.challenge-pill-text {
    font-family: var(--otb-font-body);
    font-size: 0.7rem;
    color: var(--otb-text);
    font-weight: 600;
}
.challenge-pill-reward {
    font-family: var(--otb-font-heading);
    font-size: 0.7rem;
    color: var(--otb-coin);
    flex-shrink: 0;
}
.challenge-pill-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--game-accent, #e94560), var(--otb-coin));
    border-radius: 0 0 20px 20px;
    transition: width 0.5s ease;
}

/* Keep old classes for backwards compat but hide */
.challenge-timer { display: none; }

/* ============ JOURNEY MAP (winding path) ============ */
.journey-header { text-align: center; margin-bottom: 20px; }
.journey-count { font-family: var(--otb-font-heading); color: var(--otb-coin); font-size: 1.3rem; margin-bottom: 8px; }
.journey-progress-bar { width: 80%; max-width: 400px; height: 10px; background: rgba(255,255,255,0.08); border-radius: 5px; overflow: hidden; margin: 0 auto; }
.journey-progress-fill { height: 100%; background: linear-gradient(90deg, var(--otb-success), var(--otb-coin)); border-radius: 5px; transition: width 0.5s; }
.journey-path { position: relative; max-width: 600px; margin: 0 auto; }
.journey-node {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 16px; margin-bottom: 4px;
    border-radius: 12px; transition: all 0.2s;
}
.journey-node.journey-right { flex-direction: row-reverse; text-align: right; }
.journey-node.reached { background: rgba(46,204,113,0.1); border: 1px solid rgba(46,204,113,0.2); }
.journey-node.next { background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.3); animation: journeyPulse 2s infinite; }
.journey-node.locked { opacity: 0.35; }
.journey-node-icon { font-size: 1.8rem; width: 48px; text-align: center; flex-shrink: 0; }
.journey-node-info { flex: 1; }
.journey-node-name { font-family: var(--otb-font-heading); color: var(--otb-text); font-size: 0.9rem; }
.journey-node-req { font-size: 0.7rem; color: var(--otb-text-muted); }
.journey-node-reward { color: var(--otb-coin); font-size: 0.8rem; font-weight: 600; }
@keyframes journeyPulse { 0%,100% { box-shadow: 0 0 0 rgba(255,215,0,0); } 50% { box-shadow: 0 0 16px rgba(255,215,0,0.15); } }

/* ============ REPORT CARD ============ */
.report-card {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--otb-border);
    border-radius: var(--otb-radius-lg);
    padding: 20px;
    transition: all 0.3s;
}

.report-card.report-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9000;
    border-radius: 0;
    overflow-y: auto;
    background: var(--otb-bg-primary);
    border: none;
    padding: 40px 20px;
}

.report-header {
    text-align: center;
    margin-bottom: 16px;
}

.report-title {
    font-family: var(--otb-font-heading);
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 8px;
}

.report-stars { text-align: center; font-size: 2.5rem; margin-bottom: 16px; letter-spacing: 8px; }
.report-star-filled { color: var(--otb-coin); text-shadow: 0 0 8px rgba(255,215,0,0.5); animation: otb-star-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.report-star-filled:nth-child(1) { animation-delay: 0.1s; }
.report-star-filled:nth-child(2) { animation-delay: 0.2s; }
.report-star-filled:nth-child(3) { animation-delay: 0.3s; }
.report-star-filled:nth-child(4) { animation-delay: 0.4s; }
.report-star-filled:nth-child(5) { animation-delay: 0.5s; }
.report-star-empty { color: rgba(255,255,255,0.15); }

.report-encouragement {
    text-align: center;
    margin-bottom: 16px;
}

.report-msg {
    font-family: var(--otb-font-body);
    font-size: 0.85rem;
    color: var(--otb-success);
    margin-bottom: 4px;
}

.report-highlights { background: rgba(255,215,0,0.05); border: 1px solid rgba(255,215,0,0.1); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.report-highlight-item { color: var(--otb-text); font-size: 0.85rem; padding: 4px 0; }

.report-stat-row { display: flex; gap: 16px; margin-bottom: 12px; }
.report-stat-box { flex: 1; background: rgba(255,255,255,0.03); border-radius: 10px; padding: 16px; text-align: center; }
.report-stat-value { font-family: var(--otb-font-heading); font-size: 1.5rem; color: var(--otb-text); }
.report-stat-label { font-size: 0.75rem; color: var(--otb-text-muted); margin-top: 4px; }
.report-trend-up { color: var(--otb-success); font-size: 0.8rem; }
.report-trend-down { color: var(--otb-danger); font-size: 0.8rem; }
.report-bar { height: 12px; background: rgba(255,255,255,0.08); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.report-bar-fill { height: 100%; border-radius: 6px; transition: width 1s ease; }
.report-bar-math { background: linear-gradient(90deg, #3498db, #2ecc71); }
.report-bar-reading { background: linear-gradient(90deg, #e74c3c, #f39c12); }
.report-show-btn { display: block; margin: 16px auto 0; }

.report-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-family: var(--otb-font-body);
    font-size: 0.75rem;
    color: var(--otb-text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--otb-border);
    margin-bottom: 8px;
}

/* ============ VIRTUAL PET ============ */
.pet-container {
    text-align: center;
    padding: 10px 0;
}

.pet-thought-bubble {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--otb-border);
    border-radius: 16px;
    padding: 8px 16px;
    margin-bottom: 12px;
    display: inline-block;
    position: relative;
    max-width: 240px;
}

.pet-thought-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.08);
}

.pet-thought {
    font-family: var(--otb-font-body);
    font-size: 0.8rem;
    color: var(--otb-text);
}

.pet-character {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

.pet-body {
    font-size: 3.5rem;
    line-height: 1;
    position: relative;
}

.pet-accessory {
    position: absolute;
    top: -10px;
    right: -14px;
    font-size: 1.2rem;
}

.pet-face {
    font-size: 1.5rem;
    margin-top: -8px;
}

.pet-idle { animation: petIdle 3s ease-in-out infinite; }
.pet-sway { animation: petSway 2s ease-in-out infinite; }
.pet-bounce { animation: petBounce 1s ease-in-out infinite; }
.pet-droop { animation: petDroop 4s ease-in-out infinite; }

/* Pet tricks */
.pet-trick-spin { animation: petTrickSpin 0.8s ease-in-out !important; }
.pet-trick-bounce { animation: petTrickBounce 0.8s ease-in-out !important; }
.pet-trick-wiggle { animation: petTrickWiggle 0.8s ease-in-out !important; }
.pet-trick-dance { animation: petTrickDance 1s ease-in-out !important; }

@keyframes petTrickSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes petTrickBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-20px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-12px); }
}
@keyframes petTrickWiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-15deg); }
    40% { transform: rotate(15deg); }
    60% { transform: rotate(-10deg); }
    80% { transform: rotate(10deg); }
}
@keyframes petTrickDance {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(-10deg); }
    50% { transform: scale(0.9) rotate(10deg); }
    75% { transform: scale(1.1) rotate(-5deg); }
}

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

@keyframes petSway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes petBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

@keyframes petDroop {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(4px) rotate(-2deg); }
}

.pet-info {
    margin-bottom: 12px;
}

.pet-name {
    font-family: var(--otb-font-heading);
    font-size: 1rem;
    color: var(--otb-coin);
    margin-bottom: 2px;
}

.pet-stage {
    font-family: var(--otb-font-body);
    font-size: 0.7rem;
    color: var(--otb-text-muted);
    margin-bottom: 6px;
}

.pet-mood-hearts {
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 4px;
}

.pet-heart-filled { color: #e74c3c; }
.pet-heart-empty { color: rgba(255,255,255,0.15); font-size: 1.2rem; }

.pet-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pet-btn {
    font-family: var(--otb-font-body);
    font-weight: 700;
    font-size: 0.7rem;
    border: 1px solid var(--otb-border);
    border-radius: 12px;
    padding: 6px 12px;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.2s;
    background: rgba(255, 255, 255, 0.05);
    color: var(--otb-text);
}

.pet-btn:hover { border-color: var(--otb-coin); }
.pet-btn:active { transform: scale(0.93); }
.pet-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pet-customize-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--otb-radius-md);
    padding: 12px;
    margin-top: 8px;
}

.pet-body-picker {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.pet-body-option {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--otb-border);
    border-radius: 12px;
    padding: 6px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    line-height: 1;
}

.pet-body-option.selected {
    border-color: var(--otb-coin);
    background: rgba(255, 215, 0, 0.1);
}

.pet-body-option:hover { transform: scale(1.1); }

.pet-name-edit {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.pet-name-input {
    font-family: var(--otb-font-body);
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    color: var(--otb-text);
    border: 1px solid var(--otb-border);
    border-radius: 8px;
    padding: 6px 10px;
    width: 120px;
    outline: none;
}

.pet-name-input:focus { border-color: var(--otb-coin); }

/* ============ ANIMATION EFFECTS ============ */

/* Confetti */
.anim-confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    overflow: hidden;
}

.anim-confetti-piece {
    position: absolute;
    top: -10px;
    width: 8px;
    height: 4px;
    animation: confettiFall 2s ease-in forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Coin Rain */
.anim-coin-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    overflow: hidden;
}

.anim-coin {
    position: absolute;
    top: -30px;
    animation: coinFall 2s ease-in forwards;
}

@keyframes coinFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* Coin Fly (spend) */
.anim-coin-fly {
    position: fixed;
    z-index: 9000;
    pointer-events: none;
    font-size: 1rem;
    animation: coinFlyUp 1s ease-out forwards;
}

@keyframes coinFlyUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-80px) scale(0.5); opacity: 0; }
}

/* Fire glow */
.anim-fire-glow {
    animation: fireGlow 0.5s ease-in-out 3 !important;
}

@keyframes fireGlow {
    0%, 100% { text-shadow: none; }
    50% { text-shadow: 0 0 10px #f90, 0 0 20px #f60; }
}

/* Flame particles */
.anim-flame {
    position: fixed;
    z-index: 9000;
    pointer-events: none;
    animation: flameRise 1.2s ease-out forwards;
}

@keyframes flameRise {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-40px) scale(0.3); opacity: 0; }
}

/* Level Up Overlay */
.anim-levelup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.anim-levelup-content {
    text-align: center;
}

.anim-levelup-stars {
    font-size: 2rem;
    margin-bottom: 12px;
    animation: levelStars 0.5s ease-out 0.2s both;
}

@keyframes levelStars {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.anim-levelup-text {
    font-family: var(--otb-font-heading);
    font-size: 2.5rem;
    color: var(--otb-coin);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: levelText 0.5s ease-out 0.4s both;
}

@keyframes levelText {
    from { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.anim-levelup-number {
    font-family: var(--otb-font-heading);
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 0 40px rgba(155, 89, 182, 0.6);
    animation: levelNum 0.5s ease-out 0.6s both;
}

@keyframes levelNum {
    from { transform: scale(3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.anim-fadeout {
    animation: fadeOut 0.5s ease forwards !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* XP float */
.anim-xp-float {
    position: fixed;
    z-index: 9000;
    pointer-events: none;
    font-family: var(--otb-font-heading);
    font-size: 0.9rem;
    color: var(--otb-xp);
    text-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
    animation: xpFloat 1.2s ease-out forwards;
}

@keyframes xpFloat {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-40px); opacity: 0; }
}

/* Toast */
.hub-toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--otb-panel-solid);
    border: 2px solid var(--otb-coin);
    border-radius: 16px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    white-space: nowrap;
}

.hub-toast-icon { font-size: 1.2rem; }

.hub-toast-msg {
    font-family: var(--otb-font-body);
    font-size: 0.8rem;
    color: var(--otb-text);
    font-weight: 700;
}

@keyframes toastIn {
    from { top: -60px; }
    to { top: 12px; }
}

.hub-toast-out {
    animation: toastOut 0.4s ease forwards !important;
}

@keyframes toastOut {
    from { top: 12px; opacity: 1; }
    to { top: -60px; opacity: 0; }
}

/* ============ HUB THEMES ============ */
body.theme-space::before {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(100, 100, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(155, 89, 182, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 0, 80, 0.06) 0%, transparent 60%) !important;
}

body.theme-ocean::before {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(0, 150, 200, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 200, 180, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 80, 120, 0.06) 0%, transparent 60%) !important;
}

body.theme-forest::before {
    background:
        radial-gradient(ellipse at 30% 70%, rgba(46, 204, 113, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(39, 174, 96, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 60, 30, 0.05) 0%, transparent 60%) !important;
}

body.theme-lava::before {
    background:
        radial-gradient(ellipse at 30% 80%, rgba(231, 76, 60, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 20%, rgba(243, 156, 18, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(120, 20, 0, 0.06) 0%, transparent 60%) !important;
}

body.theme-candy::before {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(244, 143, 177, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(206, 147, 216, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 183, 77, 0.06) 0%, transparent 60%) !important;
}

/* ============ HUB GREETING ============ */
.hub-greeting {
    display: none;
}

/* ============ GAME NEW BADGE ============ */
.game-new-badge {
    display: inline-block;
    background: var(--otb-danger);
    color: white;
    font-size: 0.55rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: newBadgePulse 2s infinite;
    vertical-align: middle;
    margin-left: 6px;
}

@keyframes newBadgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============ FIRST-TIME TUTORIAL ============ */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.tutorial-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    transition: opacity 0.3s;
}

.tutorial-spotlight {
    position: fixed;
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    transition: all 0.4s ease;
    z-index: 10001;
    pointer-events: none;
}

.tutorial-card {
    position: fixed;
    z-index: 10002;
    background: linear-gradient(135deg, var(--otb-bg-secondary), var(--otb-bg-tertiary));
    border: 2px solid var(--otb-coin);
    border-radius: 20px;
    padding: 24px 28px;
    text-align: center;
    max-width: 340px;
    width: 90%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 40px rgba(255, 215, 0, 0.25), 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: tutorialPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tutorial-step-indicator {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.tutorial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.3s, transform 0.3s;
}

.tutorial-dot.active {
    background: var(--otb-coin);
    transform: scale(1.3);
}

.tutorial-dot.done {
    background: var(--otb-success);
}

.tutorial-emoji {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: tutorialBounce 1s ease-in-out infinite;
}

.tutorial-text {
    font-family: var(--otb-font-heading);
    font-size: 1.15rem;
    color: var(--otb-text);
    line-height: 1.4;
    margin-bottom: 20px;
}

.tutorial-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.tutorial-skip {
    opacity: 0.6;
    font-size: 0.85rem;
}

.tutorial-next {
    font-size: 1rem;
    padding: 10px 32px;
    min-width: 120px;
}

@keyframes tutorialPop {
    0% { transform: translateX(-50%) scale(0.7); opacity: 0; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

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

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
    .shop-items-grid { grid-template-columns: repeat(3, 1fr); }
    .trophy-grid { grid-template-columns: repeat(3, 1fr); }
    .report-stat-row { flex-direction: column; gap: 8px; }
    .hub-nav-tab { font-size: 0.6rem; padding: 5px 10px; }
    .tutorial-card { padding: 20px; max-width: 300px; }
    .tutorial-text { font-size: 1rem; }
}
