/* ===================== Protection Layer ===================== */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    box-sizing: border-box;
}
img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}
@media print { body { display: none !important; } }

/* ===================== Base ===================== */
:root {
    --gold: #facc15;
    --gold-dark: #ca8a04;
    --red: #ef4444;
    --bg-dark: rgba(10, 14, 30, 0.9);
    --border: 3px solid #000;
    --shadow: 0 6px 0 #000;
    --radius: 1rem;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(145deg, #0c1445 0%, #1a3a8f 40%, #0e3a6e 100%);
    background-attachment: fixed;
    color: white;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    padding-bottom: 5rem;
}

/* ===================== Stars ===================== */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    display: block;
    background: transparent url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png') repeat top center;
    z-index: 0;
    pointer-events: none;
}
.stars  { background-size: 1000px 1000px; animation: move-stars 50s linear infinite; }
.stars2 { background-size: 1500px 1500px; animation: move-stars 100s linear infinite; opacity: 0.5; }
.stars3 { background-size: 2000px 2000px; animation: move-stars 150s linear infinite; opacity: 0.3; }

@keyframes move-stars {
    from { background-position: 0 0; }
    to   { background-position: -10000px 5000px; }
}

/* ===================== Top Bar ===================== */
.top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.25rem;
    background: rgba(5, 10, 25, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(255,255,255,0.08);
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1.5px solid rgba(34, 197, 94, 0.4);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
}

.ping-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: ping-glow 1.5s ease-in-out infinite;
}
@keyframes ping-glow {
    0%, 100% { box-shadow: 0 0 4px #22c55e; }
    50% { box-shadow: 0 0 12px #22c55e, 0 0 20px rgba(34,197,94,0.4); }
}

.status-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #86efac;
}

.players-count {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--gold);
    background: rgba(250, 204, 21, 0.1);
    border: 1.5px solid rgba(250,204,21,0.3);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
}

/* ===================== Toast Notification ===================== */
.toast-notification {
    position: fixed;
    bottom: 1.25rem;
    left: 1rem;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(10, 14, 30, 0.95);
    border: 2px solid rgba(255,255,255,0.12);
    border-left: 3px solid var(--gold);
    padding: 0.6rem 0.9rem;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateX(-110%);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 230px;
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: white;
    flex-shrink: 0;
}

.toast-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow: hidden;
}

.toast-name {
    font-weight: 900;
    font-size: 0.75rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-msg {
    font-weight: 700;
    font-size: 0.65rem;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.2);
    border: 1.5px solid #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #22c55e;
    flex-shrink: 0;
}

/* ===================== Main Layout ===================== */
.main-wrap {
    position: relative;
    z-index: 10;
    max-width: 420px;
    margin: 0 auto;
    padding: 5.5rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.header-tag {
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    background: rgba(250,204,21,0.1);
    border: 1.5px solid rgba(250,204,21,0.35);
    border-radius: 999px;
    padding: 0.3rem 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.main-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 5rem;
    letter-spacing: 0.08em;
    color: white;
    line-height: 1;
    margin: 0;
    text-shadow: 0 0 40px rgba(59,130,246,0.5), 0 4px 0 rgba(0,0,0,0.5);
}

.main-sub {
    font-weight: 700;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.06em;
    margin: 0.25rem 0 0;
}

/* ===================== Arena Panel ===================== */
.arena-panel {
    width: 100%;
    background: rgba(8, 12, 28, 0.85);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* ===================== Steps Indicator ===================== */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.75rem;
}

.step-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 1rem;
    color: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.step-dot.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
    box-shadow: 0 0 16px rgba(250,204,21,0.5);
}
.step-dot.done {
    background: rgba(34,197,94,0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.step-line {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.1);
    transition: background 0.3s ease;
}
.step-line.done {
    background: #22c55e;
}

/* ===================== Step Content ===================== */
.step { display: none; animation: popup-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.step.active { display: block; }

@keyframes popup-in {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.step-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.step-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.2rem;
    letter-spacing: 0.06em;
    color: white;
    margin: 0 0 0.25rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.step-sub {
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    margin: 0;
}

/* ===================== Glace Cards ===================== */
.glace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.game-card {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 1rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.18s ease;
    cursor: pointer;
    position: relative;
}
.game-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.game-card:active {
    transform: translateY(2px);
    box-shadow: none;
}

.card-icon {
    width: 3rem; height: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    transition: transform 0.2s;
}
.game-card:hover .card-icon { transform: scale(1.1) rotate(-5deg); }

.card-amount {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    color: white;
    margin: 0;
    line-height: 1;
}
.card-amount.gold { color: var(--gold); }

.card-label {
    font-weight: 800;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
}

.highlight-card {
    background: rgba(250,204,21,0.08);
    border-color: rgba(250,204,21,0.4);
}
.highlight-card:hover {
    background: rgba(250,204,21,0.14);
    border-color: var(--gold);
}

.max-badge {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--red);
    color: white;
    font-family: 'Bebas Neue', cursive;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    border: 2px solid rgba(0,0,0,0.4);
    transform: rotate(8deg);
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}
.max-icon { width: 3.75rem; height: 3.75rem; }

/* ===================== Guin Cards ===================== */
.guins-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.25rem;
    padding-bottom: 0.25rem;
}

.guin-card {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 0.75rem;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.18s ease;
    cursor: pointer;
}
.guin-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--gold);
    transform: scale(1.04);
}
.guin-card:active {
    transform: scale(0.97);
}

.guin-img-box {
    width: 100%;
    aspect-ratio: 1/1;
    background: rgba(255,255,255,0.05);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0.4rem;
}
.guin-img-box img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.guin-name {
    font-weight: 800;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    text-align: center;
}

/* ===================== Selection Summary ===================== */
.selection-summary {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.summary-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.summary-icon {
    width: 2.5rem; height: 2.5rem;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    flex-shrink: 0;
}

.guin-summary-icon {
    border-radius: 0.4rem;
    background: rgba(255,255,255,0.06);
    padding: 2px;
}

.summary-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.summary-label {
    font-weight: 800;
    font-size: 0.58rem;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}

.summary-value {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    color: var(--gold);
    line-height: 1;
}

.summary-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* ===================== Input ===================== */
.input-wrap {
    margin-bottom: 0.85rem;
}

.custom-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    text-align: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 1.3rem;
    letter-spacing: 0.12em;
    color: white;
    outline: none;
    transition: all 0.2s;
}
.custom-input:focus {
    border-color: var(--gold);
    background: rgba(250,204,21,0.06);
    box-shadow: 0 0 0 3px rgba(250,204,21,0.12);
}
.custom-input::placeholder {
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.12em;
}

/* ===================== Platform Buttons ===================== */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.platform-btn {
    padding: 0.6rem 0;
    border-radius: 0.6rem;
    font-family: 'Bebas Neue', cursive;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.18s ease;
}
.platform-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.25);
}
.platform-btn.selected {
    background: rgba(250,204,21,0.15);
    border-color: var(--gold);
    color: var(--gold);
}

/* ===================== Action Button ===================== */
.btn-action {
    display: block;
    width: 100%;
    background: var(--gold);
    border: none;
    border-radius: 0.75rem;
    padding: 1rem;
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: #000;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 6px 20px rgba(250,204,21,0.3);
    margin-bottom: 0.25rem;
}
.btn-action:hover {
    background: #fde047;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(250,204,21,0.45);
}
.btn-action:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(250,204,21,0.2);
}

.back-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.6rem;
    font-family: 'Bebas Neue', cursive;
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: color 0.18s;
    background: none;
    border: none;
    margin-top: 0.25rem;
}
.back-btn:hover { color: rgba(255,255,255,0.7); }

/* ===================== Progress ===================== */
.text-center { text-align: center; }
.progress-wrap {
    position: relative;
    width: 160px; height: 160px;
    margin: 1.5rem auto;
}
.progress-svg { width: 100%; height: 100%; }

#circular-progress {
    transition: stroke-dashoffset 0.3s ease-out;
    filter: drop-shadow(0 0 8px rgba(250,204,21,0.6));
}

.progress-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-pct {
    font-family: 'Bebas Neue', cursive;
    font-size: 3rem;
    letter-spacing: 0.05em;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.status-box {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 0.85rem;
}
.status-msg {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin: 0;
}

.pulse-text { animation: pulse-anim 1.5s ease-in-out infinite; }
@keyframes pulse-anim {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ===================== Verify Step ===================== */
.verify-step { text-align: center; }

.verify-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(239,68,68,0.2);
    border: 2px solid var(--red);
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem;
    color: var(--red);
    margin-bottom: 0.75rem;
    animation: pulse-red 1.5s ease-in-out infinite;
}
@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    50% { box-shadow: 0 0 0 10px rgba(239,68,68,0.15); }
}

.red-text { color: var(--red); margin-bottom: 1rem; }
.gold-text { color: var(--gold); }

.verify-card {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.verify-msg {
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.7);
    margin: 0 0 0.85rem;
    text-align: center;
    line-height: 1.5;
}

.verify-rewards {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0,0,0,0.2);
    border-radius: 0.6rem;
    padding: 0.75rem;
}

.verify-reward-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.verify-rwd-icon {
    width: 2.25rem; height: 2.25rem;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.guin-verify-icon {
    border-radius: 0.35rem;
    background: rgba(255,255,255,0.08);
    padding: 2px;
}

.reward-label {
    display: block;
    font-weight: 800;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}
.reward-value {
    display: block;
    font-family: 'Bebas Neue', cursive;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    color: white;
    line-height: 1.1;
}

.verify-sep {
    width: 1px; height: 2.5rem;
    background: rgba(255,255,255,0.1);
}

.verify-btn { margin-top: 0; }

/* ===================== Scrollbar ===================== */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(250,204,21,0.5); border-radius: 10px; }