/* ============================================================
   BRAWL STARS — STARR DROP UNBOXING THEME
   Premium dark + neon design, no wizard, single-flow
   ============================================================ */

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bs-yellow: #FFD700;
    --bs-orange: #FF8C00;
    --bs-blue: #00BFFF;
    --bs-purple: #B44AFF;
    --bs-red: #FF3B3B;
    --bs-dark: #0D0B1A;
    --bs-card: #161330;
    --bs-card-border: #2A2550;
    --radius: 16px;
    --font-head: 'Lilita One', cursive;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bs-dark);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(180,74,255,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(0,191,255,0.1) 0%, transparent 50%);
}

/* Particles Canvas */
#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== APP SHELL ===== */
.app-shell {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 30px;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.4));
    animation: logoFloat 3s ease-in-out infinite;
}

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

.logo-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    color: var(--bs-yellow);
    text-shadow: 0 2px 10px rgba(255,215,0,0.3);
}

.logo-subtitle {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.5);
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
}

.live-dot {
    width: 8px; height: 8px;
    background: #00FF6A;
    border-radius: 50%;
    box-shadow: 0 0 8px #00FF6A;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* ===== SCREEN TRANSITIONS ===== */
.screen {
    animation: screenIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen[style*="display:none"] { display: none !important; }

@keyframes screenIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== STARR DROP BOX DISPLAY ===== */
.starr-box-display {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0 10px;
}

.starr-glow {
    position: absolute;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(180,74,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

.starr-box-img {
    width: 160px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(180,74,255,0.5));
    animation: boxBounce 2.5s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.unbox-img {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 10px 40px rgba(180,74,255,0.6));
}

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

/* ===== HEADINGS ===== */
.main-heading {
    font-family: var(--font-head);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 6px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.text-yellow { color: var(--bs-yellow); }

.sub-text {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 22px;
    font-weight: 600;
    line-height: 1.4;
}

/* ===== REWARD CAROUSEL ===== */
.reward-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.reward-card {
    position: relative;
    background: var(--bs-card);
    border: 2px solid var(--bs-card-border);
    border-radius: var(--radius);
    padding: 14px 8px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.reward-card .card-glow {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,191,255,0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.reward-card .card-glow.hot {
    background: radial-gradient(circle, rgba(255,140,0,0.1) 0%, transparent 60%);
}

.reward-card .card-glow.legendary-glow {
    background: radial-gradient(circle, rgba(180,74,255,0.15) 0%, transparent 60%);
}

.reward-card:hover .card-glow,
.reward-card.active .card-glow { opacity: 1; }

.reward-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
    margin-bottom: 6px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 1;
}

.reward-card:hover img,
.reward-card.active img {
    transform: scale(1.15) translateY(-3px);
}

.card-label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.75rem;
    color: #fff;
    position: relative;
    z-index: 1;
}

.card-value {
    display: block;
    font-size: 0.6rem;
    color: rgba(255,255,255,0.35);
    font-weight: 700;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.reward-card.active {
    border-color: var(--bs-blue);
    box-shadow: 0 0 20px rgba(0,191,255,0.2), inset 0 0 0 1px rgba(0,191,255,0.15);
    background: linear-gradient(135deg, rgba(0,191,255,0.08), var(--bs-card));
}

.reward-card.legendary {
    border-color: rgba(180,74,255,0.4);
}

.reward-card.legendary.active {
    border-color: var(--bs-purple);
    box-shadow: 0 0 20px rgba(180,74,255,0.3), inset 0 0 0 1px rgba(180,74,255,0.15);
    background: linear-gradient(135deg, rgba(180,74,255,0.1), var(--bs-card));
}

.hot-tag {
    position: absolute;
    top: 4px; right: 4px;
    background: var(--bs-orange);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 6px;
    z-index: 3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.legendary-tag {
    background: var(--bs-purple);
}

/* ===== ULTRA LEGENDARY SECTION ===== */
.ultra-section {
    margin-bottom: 20px;
}

.ultra-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ultra-title {
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #FFD700, #FF6B00, #FF2D95, #B44AFF);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: ultraShimmer 3s linear infinite;
}

@keyframes ultraShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.ultra-star {
    font-size: 0.9rem;
    animation: ultraPulse 1.5s ease-in-out infinite;
}

@keyframes ultraPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

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

.ultra-card {
    border-color: transparent !important;
    background: linear-gradient(135deg, rgba(180,74,255,0.15), rgba(255,45,149,0.1), var(--bs-card)) !important;
    position: relative;
    overflow: hidden;
}

.ultra-card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #FFD700, #FF2D95, #B44AFF, #00BFFF, #FFD700);
    background-size: 300% 300%;
    z-index: -1;
    animation: ultraBorder 4s ease infinite;
}

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

.ultra-card::after {
    content: '';
    position: absolute;
    top: 1px; left: 1px; right: 1px; bottom: 1px;
    border-radius: calc(var(--radius) - 1px);
    background: linear-gradient(135deg, rgba(180,74,255,0.12), var(--bs-card));
    z-index: 0;
}

.ultra-card > * {
    position: relative;
    z-index: 1;
}

.ultra-card .card-glow.ultra-glow {
    background: radial-gradient(circle, rgba(255,45,149,0.15) 0%, transparent 60%);
    opacity: 1;
}

.ultra-card img {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 4px 12px rgba(255,45,149,0.5));
}

.ultra-card .card-label {
    background: linear-gradient(90deg, #FFD700, #FF2D95);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ultra-card .card-value {
    color: rgba(255,45,149,0.6);
}

.ultra-card.active {
    box-shadow: 0 0 30px rgba(255,45,149,0.3), 0 0 60px rgba(180,74,255,0.2);
}

.ultra-badge {
    position: absolute;
    top: 4px; right: 4px;
    background: linear-gradient(135deg, #FF2D95, #B44AFF);
    color: #fff;
    font-size: 0.45rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 6px;
    z-index: 3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    animation: ultraPulse 2s ease-in-out infinite;
}

/* ===== BIG OPEN BUTTON ===== */
.big-open-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a0a00;
    border: none;
    border-radius: 16px;
    padding: 18px 0;
    font-family: var(--font-head);
    font-size: 1.3rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow:
        0 4px 0 #C79500,
        0 8px 25px rgba(255,215,0,0.25);
}

.big-open-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: btnShine 3s infinite;
}

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

.big-open-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #C79500, 0 2px 10px rgba(255,215,0,0.2);
}

.btn-icon { font-size: 1.5rem; }

/* ===== TRUST STRIP ===== */
.trust-strip {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.trust-strip span {
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
}

/* ===== SCREEN 2: UNBOXING ===== */
.unbox-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    margin: 30px 0 20px;
}

.unbox-box {
    position: relative;
    z-index: 2;
}

/* unbox-emoji styles handled above */

.unbox-box.shaking {
    animation: shake 0.3s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-8px) rotate(-3deg); }
    75% { transform: translateX(8px) rotate(3deg); }
}

.unbox-box.explode {
    animation: explodeOut 0.5s forwards;
}

@keyframes explodeOut {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

.unbox-rays {
    position: absolute;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(255,215,0,0) 0%,
        rgba(255,215,0,0.15) 10%,
        rgba(255,215,0,0) 20%,
        rgba(180,74,255,0.15) 30%,
        rgba(180,74,255,0) 40%,
        rgba(0,191,255,0.15) 50%,
        rgba(0,191,255,0) 60%,
        rgba(255,215,0,0.15) 70%,
        rgba(255,215,0,0) 80%,
        rgba(180,74,255,0.15) 90%,
        rgba(180,74,255,0) 100%
    );
    opacity: 0;
    z-index: 1;
}

.unbox-rays.spinning {
    opacity: 1;
    animation: spinRays 3s linear infinite;
}

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

.unbox-reward-reveal {
    position: absolute;
    z-index: 3;
    text-align: center;
    animation: revealPop 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.unbox-reward-reveal img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 8px 25px rgba(255,215,0,0.5));
    margin-bottom: 10px;
}

.reveal-title {
    font-family: var(--font-head);
    font-size: 1.6rem;
    color: var(--bs-yellow);
    text-shadow: 0 4px 15px rgba(255,215,0,0.5);
}

/* Progress Area */
.unbox-progress-area {
    text-align: center;
    margin-bottom: 15px;
}

.unbox-status {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
    min-height: 20px;
}

.unbox-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

.unbox-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--bs-blue), var(--bs-purple));
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(0,191,255,0.4);
}

.unbox-pct {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--bs-blue);
    text-shadow: 0 0 10px rgba(0,191,255,0.3);
}

/* ===== VERIFY PANEL ===== */
.verify-panel {
    background: linear-gradient(135deg, rgba(255,59,59,0.1), rgba(255,59,59,0.05));
    border: 1px solid rgba(255,59,59,0.3);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    animation: revealPop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.verify-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.verify-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    color: var(--bs-red);
    margin-bottom: 8px;
}

.verify-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.verify-btn {
    width: 100%;
    background: linear-gradient(135deg, #FF3B3B, #FF6B3B);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 16px 0;
    font-family: var(--font-head);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 0 #C72020, 0 6px 20px rgba(255,59,59,0.3);
    transition: all 0.15s;
    margin-bottom: 12px;
}

.verify-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #C72020;
}

.verify-timer {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    font-weight: 700;
}

.verify-timer strong {
    color: var(--bs-red);
}

/* ===== WINNERS STRIP ===== */
.winners-strip {
    margin-top: 30px;
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 16px;
}

.winners-title {
    font-family: var(--font-head);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

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

.winner-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
}

.winner-chip img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
}

.winner-chip b {
    color: var(--bs-yellow);
}

/* ===== FOOTER ===== */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.site-footer p {
    font-family: var(--font-head);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.2);
}

.disclaimer {
    font-family: var(--font-body) !important;
    font-size: 0.65rem !important;
    max-width: 500px;
    margin: 8px auto 0;
    color: rgba(255,255,255,0.12) !important;
    line-height: 1.4;
}

/* ===== LIVE NOTIFICATION TOAST ===== */
.live-notif {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 380px;
    width: 90%;
}

.notif-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(22,19,48,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    padding: 10px 16px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.notif-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notif-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    line-height: 1.3;
}

.notif-reward {
    color: var(--bs-yellow);
    font-weight: 900;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
    .main-heading { font-size: 1.6rem; }
    .reward-carousel { gap: 6px; }
    .reward-card { padding: 10px 5px 8px; }
    .reward-card img { width: 36px; height: 36px; }
    .card-label { font-size: 0.65rem; }
    .card-value { font-size: 0.5rem; }
    .big-open-btn { font-size: 1.1rem; padding: 16px 0; }
}
