/* ══════════════════════════════════════════
   SCRATCHY KYIV — Complete Game Styles v2.0
   ══════════════════════════════════════════ */

/* ── Container fits the cabinet panel exactly ── */
#scratchyContent {
    padding: 0 !important;
    gap: 0 !important;
    position: relative;
    overflow: hidden;
    /* Matches the approximate height of the profile/chats view:
       cabinet-top-row(400) + gap(25) + bottom-row(~70) + padding(60) = 555px */
    min-height: 555px;
    /* Ensure absolute children can measure against this */
    height: 555px;
}

#scratchyContent img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

/* ── Generic screen layer ── */
.sk-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: inherit;
}

.sk-screen.hidden {
    display: none !important;
}

/* ══ MINECRAFT BACKGROUND ══ */
.sk-mc-bg {
    position: absolute;
    inset: 0;
    /* Authentic Minecraft Dirt Background */
    background: url('https://assets.mcasset.cloud/1.20.1/assets/minecraft/textures/gui/options_background.png') repeat;
    background-size: 64px 64px;
    image-rendering: pixelated;
    z-index: 0;
}

.sk-mc-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg,
            rgba(0, 0, 0, 0.55) 0%,
            rgba(0, 0, 0, 0.65) 100%);
    backdrop-filter: blur(2px);
}

.sk-mc-bg-overlay--dark {
    background: linear-gradient(160deg,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.85) 100%);
}

/* ── Floating particles ── */
.sk-mc-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.sk-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    opacity: 0;
    animation: skParticleFloat linear infinite;
    image-rendering: pixelated;
}

@keyframes skParticleFloat {
    0% {
        transform: translateY(100%) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-120%) rotate(360deg);
        opacity: 0;
    }
}

/* ══ SCREEN 1: MAIN MENU ══ */
.sk-menu-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 28px;
    padding: 30px;
}

.sk-logo-wrap {
    text-align: center;
    animation: skLogoEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes skLogoEntrance {
    from {
        transform: translateY(-30px) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.sk-logo-title {
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    text-shadow:
        0 0 40px rgba(249, 134, 82, 0.8),
        0 4px 20px rgba(0, 0, 0, 0.8),
        3px 3px 0 rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.sk-logo-title span {
    background: linear-gradient(135deg, #f98652 0%, #fbbf24 60%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sk-logo-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 6px;
}

.sk-menu-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    animation: skMenuCardsIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes skMenuCardsIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sk-menu-card {
    width: 100%;
    padding: 15px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease,
        background 0.2s ease;
    letter-spacing: 0.3px;
}

.sk-newgame-btn {
    background: linear-gradient(135deg, #f98652 0%, #d84315 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(249, 134, 82, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.4);
}

.sk-newgame-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 32px rgba(249, 134, 82, 0.6),
        0 4px 14px rgba(0, 0, 0, 0.4);
}

.sk-newgame-btn:active {
    transform: translateY(0) scale(0.98);
}

.sk-continue-btn {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.sk-continue-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.sk-continue-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.sk-settings-card {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.sk-settings-card:hover {
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
}

.sk-menu-balance-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 20px;
    color: #fbbf24;
    font-weight: 700;
    font-size: 16px;
    backdrop-filter: blur(8px);
    animation: skMenuCardsIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

/* ══ SCREEN 2: TICKET TABLE ══ */
.sk-table-bg {
    position: absolute;
    inset: 0;
    /* Spruce planks for the desk */
    background: url('https://assets.mcasset.cloud/1.20.1/assets/minecraft/textures/block/spruce_planks.png') repeat;
    background-size: 64px 64px;
    image-rendering: pixelated;
    z-index: 0;
}

.sk-table-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    height: 100%;
}

.sk-shop-sidebar {
    width: 250px;
    background: rgba(10, 5, 0, 0.75);
    backdrop-filter: blur(4px);
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.sk-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* Redesigned back button for sidebar */
.sk-back-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sk-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-2px);
}

.sk-table-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.sk-hud-balance {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    color: #fbbf24;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.sk-hud-balance i {
    font-size: 12px;
}

/* Progress bar */
.sk-progress-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sk-progress-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.5px;
}

.sk-progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.sk-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f98652, #fbbf24);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 8px rgba(249, 134, 82, 0.5);
}

/* Tickets zone — the shop list */
.sk-tickets-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom scrollbar for shop */
.sk-tickets-zone::-webkit-scrollbar {
    width: 4px;
}

.sk-tickets-zone::-webkit-scrollbar-track {
    background: transparent;
}

.sk-tickets-zone::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sk-table-desk {
    flex: 1;
    position: relative;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Individual Ticket Card on table and shop ── */
.sk-ticket-card {
    width: 200px;
    background: url('../image/game/time_ticket.png') center/cover no-repeat, url('https://assets.mcasset.cloud/1.20.1/assets/minecraft/textures/item/empty_map.png') center/cover no-repeat;
    background-size: 100% 100%;
    image-rendering: auto;
    /* Not pixelated if original isn't */
    border-radius: 8px;
    padding: 24px 16px 22px 16px;
    /* Match inner paper area of empty_map */
    cursor: pointer;
    position: relative;
    transform-origin: 50% 110%;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: perspective(600px) rotateX(2deg);
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease;
    overflow: hidden;
    user-select: none;
    /* Physics drop animation on spawn */
    animation: skTicketDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes skTicketDrop {
    0% {
        transform: perspective(600px) translateY(-120px) rotateX(-20deg) scale(0.85);
        opacity: 0;
    }

    60% {
        transform: perspective(600px) translateY(10px) rotateX(5deg) scale(1.02);
        opacity: 1;
    }

    100% {
        transform: perspective(600px) translateY(0) rotateX(2deg) scale(1);
        opacity: 1;
    }
}

.sk-ticket-card:hover:not(.sk-ticket-disabled):not(.sk-ticket-cooldown) {
    transform: perspective(600px) translateY(-8px) rotateX(-6deg) scale(1.03);
    box-shadow:
        0 22px 40px rgba(0, 0, 0, 0.55),
        0 4px 12px rgba(249, 134, 82, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    cursor: none;
}

.sk-ticket-card.sk-ticket-disabled,
.sk-ticket-card.sk-ticket-locked {
    cursor: not-allowed;
    filter: grayscale(0.6) brightness(0.7);
    transform: perspective(600px) rotateX(2deg) !important;
}

.sk-ticket-card.sk-ticket-cooldown {
    cursor: not-allowed;
    filter: brightness(0.75);
    transform: perspective(600px) rotateX(2deg) !important;
}

/* Ticket colour stripe at top */
.sk-ticket-stripe {
    display: none;
    /* Disabled as it clashes with empty_map.png top border */
    height: 6px;
    border-radius: 2px 2px 0 0;
    margin-bottom: 2px;
}

.sk-ticket-card[data-tier="timed"] .sk-ticket-stripe {
    background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.sk-ticket-card[data-tier="copper"] .sk-ticket-stripe {
    background: linear-gradient(90deg, #b45309, #d97706);
}

.sk-ticket-card[data-tier="iron"] .sk-ticket-stripe {
    background: linear-gradient(90deg, #6b7280, #d1d5db);
}

.sk-ticket-card[data-tier="gold"] .sk-ticket-stripe {
    background: linear-gradient(90deg, #d97706, #fbbf24);
}

.sk-ticket-card[data-tier="diamond"] .sk-ticket-stripe {
    background: linear-gradient(90deg, #0891b2, #38bdf8);
}

/* Ticket body */
.sk-ticket-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sk-ticket-icon {
    font-size: 32px;
    text-align: center;
    line-height: 1;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.sk-ticket-name {
    font-size: 15px;
    font-weight: 800;
    color: #1c1917;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 2px;
}

.sk-ticket-fields {
    font-size: 10px;
    color: #78716c;
    text-align: center;
    font-weight: 600;
}

.sk-ticket-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: 6px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #92400e;
}

.sk-ticket-price i {
    color: #d97706;
    font-size: 11px;
}

/* Cooldown badge */
.sk-ticket-cooldown-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(2px);
}

.sk-ticket-cooldown-badge i {
    font-size: 20px;
    color: #60a5fa;
}

/* Free badge */
.sk-ticket-free-badge {
    position: absolute;
    top: 10px;
    right: -8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 14px 3px 8px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8% 100%);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Locked badge */
.sk-ticket-lock-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 8px;
}

.sk-ticket-lock-badge i {
    font-size: 22px;
    color: #fbbf24;
}

/* Table notice */
.sk-table-notice {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    padding: 4px 0;
    min-height: 18px;
}

/* ══ COIN CURSOR ══ */
.sk-coin-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    display: none;
    /* toggled by JS */
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    background: url('https://assets.mcasset.cloud/1.20.1/assets/minecraft/textures/item/iron_nugget.png') no-repeat center/contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}

/* ── Scratch Dust Particles ── */
#skScratchParticlesWrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.sk-scratch-dust {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 2px;
    pointer-events: none;
    animation: skDustFly 0.5s ease-out forwards;
}

@keyframes skDustFly {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--dx), var(--dy)) scale(0) rotate(var(--rot));
        opacity: 0;
    }
}

/* ══ SCREEN 3: ACTIVE SCRATCH ══ */
.sk-scratch-dimmer {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 0;
}

.sk-scratch-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    height: 100%;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.sk-scratch-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 2;
}

/* Scratch stage — the visual ticket + grid */
.sk-scratch-stage {
    position: relative;
}

/* Right Panel: Odds */
.sk-scratch-sidebar {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.sk-chances-panel {
    background: rgba(40, 30, 20, 0.95);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    width: 260px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sk-chances-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.sk-chances-subtitle {
    font-size: 12px;
    color: #a8a29e;
    margin-bottom: 15px;
    line-height: 1.3;
}

.sk-chances-header {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.sk-chances-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.sk-chance-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.sk-chance-item img {
    width: 20px;
    height: 20px;
    image-rendering: auto;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.sk-chance-pct {
    color: #fed7aa;
    width: 45px;
}

.sk-chance-val {
    color: #fbbf24;
    margin-left: auto;
}

.sk-chances-footer {
    font-size: 11px;
    color: #78716c;
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

/* The physical ticket panel */
.sk-active-ticket {
    background: url('../image/game/time_ticket.png') center/cover no-repeat, url('https://assets.mcasset.cloud/1.20.1/assets/minecraft/textures/item/empty_map.png') center/cover no-repeat;
    background-size: 100% 100%;
    image-rendering: auto;
    border-radius: 12px;
    padding: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 4px 16px rgba(0, 0, 0, 0.4);
    cursor: none !important;
    border: 2px solid #444;
    width: 100%;
    max-width: 520px;
    position: relative;
    /* Pickup animation */
    animation: skTicketPickup 0.55s cubic-bezier(0.34, 1.20, 0.64, 1) both;
}

@keyframes skTicketPickup {
    0% {
        transform: scale(0.55) translateY(60px) rotate(-4deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.03) translateY(-6px) rotate(0.5deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 1;
    }
}

.sk-active-ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sk-active-ticket-title {
    font-size: 13px;
    font-weight: 800;
    color: #1c1917;
}

.sk-active-ticket-hint {
    font-size: 11px;
    color: #78716c;
    font-style: italic;
}

/* ── Scratch Grid ── */
.sk-scratch-grid {
    display: grid;
    gap: 8px;
    width: 100%;
}

.sk-scratch-grid[data-cols="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.sk-scratch-grid[data-cols="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.sk-scratch-grid[data-cols="5"] {
    grid-template-columns: repeat(5, 1fr);
}

/* Individual scratch cell */
.sk-cell {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #d4c4a0;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.sk-cell-item {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 4px 4px;
}

.sk-cell-item img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    user-select: none;
    -webkit-user-drag: none;
}

.sk-cell-item-label {
    font-size: 8px;
    font-weight: 700;
    color: #44403c;
    text-align: center;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 3px;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}

.sk-cell.sk-cell-revealed .sk-cell-item-label {
    opacity: 1;
}

/* Canvas scratch overlay */
.sk-cell-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    touch-action: none;
    cursor: none;
}

/* Reveal animation */
.sk-cell.sk-cell-revealed .sk-cell-canvas {
    display: none;
}

.sk-cell.sk-cell-revealed .sk-cell-item img {
    animation: skItemReveal 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes skItemReveal {
    0% {
        transform: scale(0.3) rotate(-20deg);
        opacity: 0;
    }

    55% {
        transform: scale(1.18) rotate(4deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Winning cell */
.sk-cell.sk-cell-winning {
    border-color: #fbbf24 !important;
    box-shadow: 0 0 0 2px #fbbf24, 0 0 20px rgba(251, 191, 36, 0.6) !important;
    animation: skWinPulse 1.2s ease-in-out infinite;
}

@keyframes skWinPulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px #fbbf24, 0 0 12px rgba(251, 191, 36, 0.4);
    }

    50% {
        box-shadow: 0 0 0 3px #fbbf24, 0 0 30px rgba(251, 191, 36, 0.8);
    }
}

/* ── Collect bar ── */
.sk-collect-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: skCollectSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes skCollectSlideUp {
    from {
        transform: translateY(30px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.sk-collect-bar.hidden {
    display: none;
}

.sk-collect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.4);
    font-family: inherit;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sk-collect-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 28px rgba(249, 134, 82, 0.55);
}

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

/* Ticket fly-away animation */
.sk-active-ticket.sk-ticket-flyaway {
    animation: skTicketFly 0.6s cubic-bezier(0.55, 0.05, 0.67, 0.19) forwards;
}

@keyframes skTicketFly {
    0% {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: scale(0.3) translateY(-200px) rotate(15deg);
        opacity: 0;
    }
}

/* ══ RESULT OVERLAY ══ */
.sk-result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    animation: skResultFadeIn 0.35s ease;
}

.sk-result-overlay.hidden {
    display: none;
}

@keyframes skResultFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.sk-result-box {
    text-align: center;
    padding: 30px 36px;
    background: rgba(20, 15, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: skResultPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 320px;
    width: 90%;
}

@keyframes skResultPop {
    from {
        transform: scale(0.65) rotate(-3deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.sk-result-emoji {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 8px;
    animation: skEmojiBounc 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes skEmojiBounc {
    from {
        transform: scale(0) rotate(-20deg);
    }

    to {
        transform: scale(1) rotate(0deg);
    }
}

.sk-result-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.sk-result-sum {
    font-size: 36px;
    font-weight: 900;
    color: #fbbf24;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    margin-bottom: 2px;
}

.sk-result-sum.sk-result-loss {
    color: #9ca3af;
    font-size: 24px;
}

.sk-result-combo {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

/* Confetti */
.sk-confetti-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.sk-confetti-piece {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    top: -12px;
    animation: skConfettiFall linear forwards;
}

@keyframes skConfettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(600px) rotate(800deg);
    }
}

/* ══ SETTINGS OVERLAY ══ */
.sk-settings-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.80);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: skResultFadeIn 0.25s ease;
}

.sk-settings-overlay.hidden {
    display: none;
}

.sk-settings-box {
    background: rgba(20, 13, 6, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 28px 32px;
    min-width: 280px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: skResultPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sk-settings-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sk-settings-title i {
    color: var(--accent-color);
}

.sk-settings-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
}

.sk-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.sk-settings-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sk-settings-label i {
    color: var(--accent-color);
}

/* Toggle switch */
.sk-toggle {
    width: 46px;
    height: 26px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.3s ease;
}

.sk-toggle.sk-toggle-on {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.sk-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sk-toggle.sk-toggle-on .sk-toggle-knob {
    transform: translateX(20px);
}

.sk-settings-close {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f98652, #d84315);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    box-shadow: 0 4px 14px rgba(249, 134, 82, 0.3);
}

.sk-settings-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(249, 134, 82, 0.5);
}

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
    .sk-logo-title {
        font-size: 32px;
    }

    .sk-tickets-zone {
        gap: 12px;
    }

    .sk-ticket-card {
        width: 130px;
    }

    .sk-active-ticket {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .sk-ticket-card {
        width: 110px;
    }

    .sk-menu-cards {
        max-width: 100%;
    }

    .sk-result-box {
        padding: 22px 20px;
    }

    .sk-result-actions {
        flex-direction: column;
    }
}