/* ==========================================================
   ORBIT BURST - PREMIUM MOBILE STYLESHEET
   Aesthetics: Glassmorphism, Electric Emerald & Mystical Violet
   Mobile First: max-width 480px, responsive & centered
   ========================================================== */

:root {
    --bg-dark: #070913;
    --bg-card: rgba(18, 24, 46, 0.68);
    --bg-card-border: rgba(168, 85, 247, 0.28);
    --bg-card-glow: rgba(0, 245, 155, 0.15);

    --primary-emerald: #00f59b;
    --primary-emerald-glow: rgba(0, 245, 155, 0.4);
    --primary-violet: #a855f7;
    --primary-violet-dark: #7e22ce;
    --accent-cyan: #06b6d4;
    --accent-gold: #fbbf24;
    --danger-red: #f43f5e;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Rajdhani', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;

    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--text-primary);
    overflow: hidden;
    position: fixed;
}

body {
    background: url('bg.jpg') center/cover no-repeat fixed;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base Mobile Frame Container */
.app-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100%;
    max-height: 920px;
    background: rgba(7, 10, 24, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 245, 155, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 481px) {
    .app-wrapper {
        height: 92vh;
        border-radius: var(--radius-lg);
    }
}

/* Ambient Ambient Glow Overlays */
.ambient-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(80px);
    opacity: 0.35;
}

.glow-top {
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--primary-violet) 0%, transparent 70%);
}

.glow-bottom {
    bottom: -80px;
    right: -40px;
    background: radial-gradient(circle, var(--primary-emerald) 0%, transparent 70%);
}

/* Glass & UI Card Primitives */
.glass-bar {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-bar.hidden {
    display: none;
}

.header-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 0%, var(--primary-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
}

/* Typography & Accent helpers */
.glow-text {
    text-shadow: 0 0 20px var(--primary-violet-dark), 0 0 40px var(--primary-emerald-glow);
}

.accent-text {
    background: linear-gradient(135deg, var(--primary-emerald) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-cyan {
    color: var(--accent-cyan) !important;
}

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

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* Pills & Badges */
.currency-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

.crystal-icon {
    font-size: 0.95rem;
    filter: drop-shadow(0 0 6px var(--accent-cyan));
}

/* Interactive Buttons */
.btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: var(--radius-md);
    transition: transform 0.18s var(--ease-elastic), box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-emerald) 0%, #059669 100%);
    color: #04130d;
    padding: 15px 24px;
    font-size: 1.05rem;
    box-shadow: 0 8px 24px var(--primary-emerald-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 10px 28px rgba(0, 245, 155, 0.55);
}

.pulse-btn {
    animation: buttonPulse 2.4s infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 15px var(--primary-emerald-glow);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 245, 155, 0.7);
    }
}

.glass-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 12px 18px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 1px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.glass-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.14);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:active {
    transform: scale(0.92);
    background: rgba(168, 85, 247, 0.3);
}

/* Screens Viewport */
#screens-viewport {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
}

.app-screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.97) translateY(8px);
    transition: opacity 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
    overflow: hidden;
}

.app-screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

/* Screen Headers for Sub-screens */
.screen-header-pad {
    padding: 20px 20px 14px;
    text-align: center;
}

.screen-header-pad h2 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 4px;
}

/* ==========================================================
   1. WELCOME SCREEN
   ========================================================== */
#screen-welcome .welcome-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 24px;
    overflow-y: auto;
}

.logo-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 10px;
}

.logo-ring {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 28px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(0, 245, 155, 0.1) 80%);
    border: 2px solid rgba(0, 245, 155, 0.5);
    box-shadow: 0 0 35px var(--primary-emerald-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: floatGlow 3.5s ease-in-out infinite alternate;
}

@keyframes floatGlow {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 25px rgba(0, 245, 155, 0.3);
    }
    100% {
        transform: translateY(-8px) scale(1.03);
        box-shadow: 0 0 45px rgba(168, 85, 247, 0.5);
    }
}

.hero-logo-img {
    width: 86px;
    height: 86px;
    border-radius: 18px;
    object-fit: cover;
}

.game-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 3px;
    color: #fff;
    margin-bottom: 6px;
}

.welcome-card {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.feature-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.25;
}

.welcome-actions .btn {
    width: 100%;
}

/* ==========================================================
   2. HOME SCREEN
   ========================================================== */
#screen-home .home-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 20px 24px;
    overflow-y: auto;
}

.user-status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(18, 24, 46, 0.7);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: var(--radius-md);
}

.status-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--primary-emerald);
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-info {
    flex: 1;
}

.player-rank {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--primary-emerald);
}

.stats-row {
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

.stat-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stat-badge .val {
    font-weight: 700;
    color: #fff;
    font-family: var(--font-display);
}

/* Home Visual Core Spinner */
.home-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
}

.core-preview-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.mini-orbit-spinner {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px dashed rgba(168, 85, 247, 0.5);
    animation: rotateOrbit 10s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes rotateOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mini-center-core {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-emerald) 0%, var(--primary-violet-dark) 100%);
    box-shadow: 0 0 25px var(--primary-emerald-glow);
    border: 2px solid #fff;
}

.mini-orbit-pin {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.pin-1 { top: -7px; left: 63px; }
.pin-2 { bottom: 18px; left: 14px; background: var(--accent-gold); }
.pin-3 { bottom: 18px; right: 14px; }

.highest-score-badge {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.highest-score-badge span {
    color: var(--accent-gold);
    font-size: 1rem;
}

/* Home Menu Actions */
.home-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-hero-play {
    position: relative;
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.btn-hero-play .play-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.play-action {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.play-sub {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.8;
}

.play-icon-arrow {
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px;
    gap: 4px;
}

.menu-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.menu-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.menu-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ==========================================================
   3. GAME SCREEN
   ========================================================== */
#screen-game {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.game-hud {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(180deg, rgba(7, 9, 19, 0.85) 0%, transparent 100%);
}

.hud-left, .hud-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hud-stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
}

.hud-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.hud-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.score-display {
    text-align: center;
}

.score-main {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.score-combo {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 1px;
    animation: comboPulse 0.4s ease;
}

.score-combo.hidden {
    display: none;
}

@keyframes comboPulse {
    0% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Arena & Canvas */
.game-arena {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.tap-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 38%;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    z-index: 15;
}

.launch-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.6;
    animation: bounceTap 1.6s ease-in-out infinite;
}

@keyframes bounceTap {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-6px); opacity: 0.8; }
}

.launch-arrow {
    font-size: 0.9rem;
    color: var(--primary-emerald);
}

.launch-text {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-emerald);
}

/* Ammo Tray */
.ammo-tray {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 20px;
    background: linear-gradient(0deg, rgba(7, 9, 19, 0.9) 0%, transparent 100%);
}

.ammo-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.ammo-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 320px;
}

.ammo-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--primary-emerald);
    box-shadow: 0 0 8px var(--primary-emerald-glow);
    transition: all 0.25s var(--ease-elastic);
    transform: rotate(45deg);
}

.ammo-dot.used {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
    transform: rotate(45deg) scale(0.65);
}

/* ==========================================================
   4. LEVELS SCREEN
   ========================================================== */
.levels-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 18px 24px;
    -webkit-overflow-scrolling: touch;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.level-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.level-card:active {
    transform: scale(0.95);
}

.level-card.current {
    border-color: var(--primary-emerald);
    box-shadow: 0 0 16px var(--primary-emerald-glow);
    background: rgba(0, 245, 155, 0.1);
}

.level-card.locked {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

.level-number {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.level-stars {
    font-size: 0.75rem;
    color: var(--accent-gold);
    letter-spacing: 2px;
}

.level-stars .empty-star {
    color: rgba(255, 255, 255, 0.2);
}

.level-lock-icon {
    font-size: 1.1rem;
    margin: 2px 0;
}

/* ==========================================================
   5. ACHIEVEMENTS SCREEN
   ========================================================== */
.achievements-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 18px 24px;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
}

.achievement-card.completed {
    border-color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.08);
}

.achievement-icon-box {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achievement-details {
    flex: 1;
}

.achievement-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.achievement-details p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-violet) 0%, var(--primary-emerald) 100%);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

.achievement-reward {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.reward-pill {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.btn-claim {
    padding: 6px 10px;
    font-size: 0.75rem;
    background: var(--accent-gold);
    color: #000;
    border-radius: var(--radius-sm);
}

/* ==========================================================
   6. SHOP SCREEN
   ========================================================== */
.shop-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

.shop-tab {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-tab.active {
    background: var(--primary-violet);
    border-color: var(--primary-violet);
    color: #fff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.shop-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 18px 24px;
}

.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.shop-item-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.shop-item-card.equipped {
    border-color: var(--primary-emerald);
    box-shadow: 0 0 15px var(--primary-emerald-glow);
}

.item-preview {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skin-shard-preview {
    width: 8px;
    height: 38px;
    border-radius: 4px;
}

.skin-core-preview {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.shop-item-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.shop-btn {
    width: 100%;
    padding: 8px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================
   MODALS & OVERLAYS
   ========================================================== */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.modal-card {
    width: 100%;
    max-width: 380px;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.animate-pop {
    animation: popIn 0.35s var(--ease-elastic);
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.sector-badge, .danger-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 6px;
}

.sector-badge {
    background: rgba(0, 245, 155, 0.15);
    border: 1px solid var(--primary-emerald);
    color: var(--primary-emerald);
}

.danger-badge {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
}

.stars-earned-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 2.4rem;
    margin: 12px 0;
}

.star-fx {
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.4s var(--ease-elastic);
}

.star-fx.earned {
    color: var(--accent-gold);
    text-shadow: 0 0 20px var(--accent-gold);
    transform: scale(1.15);
}

.win-metrics, .fail-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    margin: 16px 0;
}

.metric-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-col .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.metric-col .val {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.metric-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.modal-actions-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-action-small {
    padding: 10px;
    font-size: 0.85rem;
}

/* Toast Notifications */
.toast-tray {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90%;
    max-width: 360px;
}

.toast-item {
    background: rgba(18, 24, 46, 0.92);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.3);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: toastAnim 2.8s ease forwards;
}

@keyframes toastAnim {
    0% { opacity: 0; transform: translateY(-12px) scale(0.9); }
    12% { opacity: 1; transform: translateY(0) scale(1); }
    85% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-16px) scale(0.9); }
}
