@import url("https://fonts.googleapis.com/css2?family=Lilita+One&family=Roboto:wght@400;700;900&display=swap");

:root {
    --clash-blue: #3671d4;
    --clash-gold: #ffcc00;
    --clash-gold-dark: #cc9900;
    --clash-red: #ff3333;
    --bg-deep-blue: #162454;
    --glass-bg: rgba(30, 41, 75, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-gradient: linear-gradient(135deg, #f59e0b, #ea580c);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #0f172a radial-gradient(circle at top, #1e293b, #0f172a);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Ticker */
.winners-ticker {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
}

.ticker-item {
    padding: 0 40px;
    font-weight: bold;
    color: #cbd5e1;
    font-size: 13px;
}

.ticker-item span {
    color: var(--clash-gold);
}

@keyframes ticker {
    0% {
        transform: translateX(50%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Main Container */
.main-container {
    padding-top: 60px;
    padding-bottom: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.live-badge {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--clash-red);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 11px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fca5a5;
    text-transform: uppercase;
}

.live-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--clash-red);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* Selection Shell */
.selection-shell {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 95%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.nav-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid var(--glass-border);
}

.tab-btn {
    flex: 1;
    padding: 15px 5px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.tab-btn i {
    font-size: 20px;
}

.tab-btn.active {
    color: var(--clash-gold);
    background: rgba(245, 158, 11, 0.1);
}

.tab-btn img {
    width: 24px;
    height: 24px;
    opacity: 0.6;
}

.tab-btn.active img {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--clash-gold));
}

.selection-header {
    padding: 20px;
    text-align: center;
}

.selection-header h2 {
    font-family: 'Lilita One', cursive;
    color: var(--clash-gold);
    font-size: 24px;
    margin-bottom: 5px;
}

.selection-header p {
    color: #94a3b8;
    font-size: 13px;
}

.selected-count-bar {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--clash-gold);
    margin: 0 20px;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
}

.selected-count-bar span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--clash-gold);
    font-weight: bold;
}

.selected-count-bar strong {
    font-size: 24px;
    color: #fff;
}

/* Reward List */
.reward-list-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.reward-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.reward-item.selected {
    border-color: var(--clash-gold);
    background: rgba(245, 158, 11, 0.1);
}

.reward-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reward-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.reward-text-container h3 {
    font-size: 16px;
    font-weight: bold;
    color: #f8fafc;
}

.reward-text-container .rarity {
    font-size: 12px;
    color: var(--clash-gold);
    font-weight: bold;
}

.reward-text-container .details {
    font-size: 12px;
    color: #94a3b8;
}

.reward-select-btn {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #92400e;
}

.reward-select-btn.selected {
    background: #475569;
    box-shadow: 0 4px 0 #1e293b;
}

/* Footer Actions */
.selection-footer {
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
}

.confirm-btn {
    width: 100%;
    background: var(--primary-gradient);
    padding: 18px;
    border: none;
    border-radius: 16px;
    color: #fff;
    font-family: 'Lilita One', cursive;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 6px 0 #92400e;
    transition: transform 0.1s;
}

.confirm-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #92400e;
}

/* Stages */
.stage {
    display: none;
    width: 100%;
    padding: 0 10px;
    animation: fadeIn 0.4s ease-out;
}

.stage.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Intro Style */
.intro-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    width: 100%;
}

.logo {
    width: 180px;
    margin-bottom: 20px;
}

.intro-card h1 {
    font-family: 'Lilita One', cursive;
    font-size: 32px;
    color: var(--clash-gold);
    margin-bottom: 10px;
}

.input-group input {
    width: 100%;
    padding: 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    text-align: center;
    margin: 20px 0;
}

/* Tap Section */
.interaction-area {
    text-align: center;
}

.chest-container {
    position: relative;
    margin: 40px 0;
}

.main-chest {
    width: 250px;
    filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.4));
}

.tap-count-badge {
    position: absolute;
    top: -10px;
    right: 20%;
    background: #ef4444;
    border: 4px solid #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Lilita One', cursive;
    font-size: 24px;
}

.unlock-progress {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s;
}

/* Success Card */
.success-full {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.success-card {
    background: var(--glass-bg);
    border: 1px solid var(--clash-gold);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
}

/* Verification & Offers */
.verification-shell {
    border-top: 4px solid var(--clash-gold);
}

.urgency-timer {
    background: #ef4444;
    color: #fff;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.offer-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.offer-item:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--clash-gold);
    transform: scale(1.02);
}

.offer-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}

.offer-content {
    flex: 1;
}

.offer-title {
    font-weight: bold;
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
}

.offer-desc {
    font-size: 12px;
    color: #94a3b8;
}

.offer-btn {
    background: var(--primary-gradient);
    color: #fff;
    padding: 6px 15px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 4px 0 #92400e;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--clash-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}