/* ============================================
   CASIVAL BONUS SANS KARTI
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

/* --- Screen & Overlay base --- */
.screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
}

.hidden {
    display: none !important;
}

/* ============================================
   NICKNAME MODAL
   ============================================ */
#nickname-modal {
    z-index: 200;
    padding: 16px;
}

.nm-card {
    position: relative;
    width: 100%;
    max-width: 540px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(175deg, rgba(18,18,18,0.97) 0%, rgba(8,8,8,0.99) 100%);
    border: 1px solid rgba(255,215,0,0.12);
    box-shadow: 0 40px 120px rgba(0,0,0,0.8), 0 0 60px rgba(255,215,0,0.03);
    will-change: transform, opacity;
}

.nm-gold-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, #DAA520 50%, transparent 95%);
}

.nm-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 36px 24px;
}

.nm-logo {
    height: 64px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.15));
}

.nm-title {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.2;
}

.nm-desc {
    color: rgba(255,255,255,0.35);
    font-size: 13px;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.6;
}

/* --- Divider --- */
.nm-divider {
    display: none;
}

/* --- Prize Slider --- */
.nm-slider-section {
    border-top: 1px solid rgba(255,215,0,0.08);
    padding: 16px 0 20px;
    width: 100%;
    overflow: hidden;
}

.nm-prizes-title {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(218,165,32,0.6);
    margin-bottom: 12px;
}

.nm-slider-track {
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.nm-slider-inner {
    display: flex;
    gap: 8px;
    animation: prizeSlide 25s linear infinite;
    width: max-content;
}

.nm-slider-inner img {
    height: 200px;
    width: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

@keyframes prizeSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Form --- */
.nm-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#nickname-input {
    width: 100%;
    max-width: 380px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    color: #fff;
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.08);
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

#nickname-input::placeholder {
    color: rgba(255,255,255,0.25);
}

#nickname-input:focus {
    background: rgba(255,215,0,0.04);
    border-color: rgba(255,215,0,0.35);
    box-shadow: 0 0 20px rgba(255,215,0,0.06);
}

.nm-btn {
    width: 100%;
    max-width: 380px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.nm-btn:not(:disabled) {
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    color: #fff;
    box-shadow: 0 4px 24px rgba(218,165,32,0.3);
}

.nm-btn:not(:disabled):hover {
    transform: scale(1.02);
    box-shadow: 0 6px 32px rgba(218,165,32,0.4);
}

.nm-btn:not(:disabled):active {
    transform: scale(0.98);
}

.nm-btn:disabled {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.2);
    cursor: not-allowed;
    opacity: 0.5;
}

.nm-form.shake #nickname-input {
    border-color: #ff4444;
    box-shadow: 0 0 15px rgba(255,68,68,0.2);
    animation: shakeInput 0.5s cubic-bezier(0.36,0.07,0.19,0.97) both;
}

@keyframes shakeInput {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-6px); }
    40%, 60% { transform: translateX(6px); }
}

/* ============================================
   CARD SELECTION
   ============================================ */
#card-selection {
    z-index: 10;
    overflow-y: auto;
    padding: 20px 0;
}

.cs-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.cs-logo {
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(255,215,0,0.15));
}

.cs-greeting {
    margin-top: 12px;
    color: rgba(255,255,255,0.35);
    font-size: 14px;
    letter-spacing: 0.05em;
}

.cs-greeting span {
    color: rgba(255,215,0,0.8);
    font-weight: 600;
}

.cs-title {
    font-size: clamp(24px, 4.5vw, 38px);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-align: center;
    margin-top: 8px;
    background: linear-gradient(180deg, #FFE082 0%, #FFD700 30%, #FFA000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 12px rgba(255,165,0,0.25));
}

.cs-subtitle {
    color: rgba(255,255,255,0.2);
    font-size: 12px;
    margin-top: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* --- 6 Cards --- */
.cs-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    z-index: 10;
    padding: 0 5vw;
    width: 100%;
    max-width: 100%;
}

.card-btn {
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1), filter 0.3s ease;
    border-radius: 14px;
    overflow: visible;
}

.card-btn:hover {
    transform: scale(1.08) translateY(-8px);
    filter: brightness(1.15);
    z-index: 20;
}

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

.card-glow {
    position: absolute;
    inset: -20%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(circle, rgba(255,215,0,0.2) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    z-index: 5;
}

.card-btn:hover .card-glow {
    opacity: 1;
}

.card-float {
    width: 100%;
    animation: cardFloat var(--float-dur) ease-in-out infinite;
    animation-delay: var(--float-delay);
}

.card-float img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.6));
    transition: filter 0.3s ease;
}

.card-btn:hover .card-float img {
    filter: drop-shadow(0 14px 40px rgba(255,215,0,0.25)) brightness(1.1);
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(var(--float-y)); }
}

/* ============================================
   VIDEO OVERLAY
   ============================================ */
#video-overlay {
    z-index: 300;
    background: #000;
}

.video-el {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
}

/* ============================================
   REVEAL CARD (animasyonsonu.jpg)
   ============================================ */
#reveal-overlay {
    z-index: 400;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a14 60%, #000 100%);
    overflow: hidden;
}

#confetti-canvas, #confetti-canvas-2 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.reveal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    z-index: 20;
    position: relative;
}

.reveal-hint {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.05em;
    animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.reveal-card-wrap {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    max-width: 420px;
    width: 80vw;
    perspective: 1000px;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.reveal-card-wrap:hover {
    transform: scale(1.03);
}

.reveal-card-wrap:active {
    transform: scale(0.97);
}

.reveal-card-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 16px 50px rgba(0,0,0,0.5));
}

.reveal-card-img.prize-revealed {
    filter: drop-shadow(0 16px 50px rgba(0,0,0,0.5));
}

.reveal-card-shimmer {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    overflow: hidden;
    pointer-events: none;
}

.reveal-card-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: cardShimmer 3s ease-in-out infinite;
}

@keyframes cardShimmer {
    0% { left: -100%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

/* ============================================
   PRIZE RESULT
   ============================================ */
#prize-overlay {
    z-index: 450;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a14 60%, #000 100%);
    overflow: hidden;
}

.prize-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    z-index: 20;
    position: relative;
}

.prize-logo {
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.15));
}

.prize-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 900;
    color: #fff;
    text-align: center;
    background: linear-gradient(180deg, #FFE082, #FFD700, #FFA000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prize-card-wrap {
    max-width: 420px;
    width: 80vw;
}

.prize-card-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 16px 50px rgba(0,0,0,0.5));
}

.prize-claim-btn {
    padding: 16px 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    box-shadow: 0 0 28px rgba(218,165,32,0.3), 0 4px 16px rgba(0,0,0,0.2);
    border: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-family: inherit;
    margin-top: 8px;
}

.prize-claim-btn:hover {
    transform: scale(1.04);
}

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

/* ============================================
   SUCCESS
   ============================================ */
#success-overlay {
    z-index: 500;
    background: #000;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px;
    text-align: center;
}

.success-logo {
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.15));
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 0 40px rgba(34,197,94,0.3);
}

.success-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 900;
    background: linear-gradient(180deg, #FFE082, #FFA000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-prize-info {
    color: rgba(255,255,255,0.7);
    font-size: 17px;
    line-height: 1.7;
    max-width: 460px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 14px;
    padding: 16px 24px;
}

.success-prize-info span {
    color: #FFD700;
    font-weight: 800;
    font-size: 19px;
}

.success-prize-info strong {
    color: #fff;
    font-weight: 700;
}

/* ============================================
   WAIT / COUNTDOWN
   ============================================ */
#wait-popup {
    z-index: 600;
    background: radial-gradient(ellipse at center top, #0f0f1a 0%, #050508 100%);
}

.wt-card {
    position: relative;
    background: linear-gradient(165deg, rgba(16,16,28,0.95) 0%, rgba(8,8,16,0.98) 100%);
    border: 1px solid rgba(255,215,0,0.1);
    border-radius: 28px;
    padding: 0 36px 36px;
    max-width: 440px;
    width: 92%;
    text-align: center;
    box-shadow: 0 30px 100px rgba(0,0,0,0.6);
    overflow: hidden;
}

.wt-top-strip {
    height: 4px;
    background: linear-gradient(90deg, #DAA520, #FFD700, #DAA520);
    margin: 0 -36px 28px;
}

.wt-logo {
    height: 44px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 12px rgba(255,215,0,0.15));
}

.wt-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
}

.wt-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.wt-time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 14px 18px 10px;
    min-width: 80px;
}

.wt-time-block span {
    font-family: inherit;
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(180deg, #FFE082 0%, #FFD700 40%, #FFA000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
    line-height: 1;
}

.wt-time-block small {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

.wt-sep {
    font-size: 2rem;
    color: rgba(255,215,0,0.4);
    font-weight: 700;
    animation: sepBlink 1s step-end infinite;
    -webkit-text-fill-color: initial;
    margin-top: -12px;
}

@keyframes sepBlink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.15; }
}

.wt-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    margin-bottom: 20px;
}

.wt-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,215,0,0.04);
    border: 1px solid rgba(255,215,0,0.1);
    border-radius: 14px;
    padding: 16px 18px;
    text-align: left;
}

.wt-note-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

.wt-note p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin: 0;
}

.wt-note strong {
    color: #FFD700;
    font-weight: 700;
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet and mobile: stack nickname modal vertically */
@media (max-width: 860px) {
    .nm-card {
        max-width: 95vw;
    }

    .nm-content {
        padding: 28px 24px 20px;
    }

    .nm-logo {
        height: 52px;
        margin-bottom: 14px;
    }

    .nm-title {
        font-size: 19px;
    }

    .nm-desc {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .nm-slider-inner img {
        height: 160px;
    }
}

@media (max-width: 768px) {
    .cs-header {
        margin-bottom: 16px;
    }

    .cs-logo {
        height: 40px;
    }

    .cs-greeting {
        margin-top: 8px;
        font-size: 13px;
    }

    .cs-subtitle {
        font-size: 11px;
        margin-top: 4px;
    }

    .cs-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 28px;
        max-width: 420px;
    }

    .reveal-hint {
        font-size: 14px;
    }

    .reveal-card-wrap {
        max-width: 340px;
        width: 85vw;
    }

    .prize-content {
        gap: 12px;
        padding: 16px;
    }

    .prize-card-wrap {
        max-width: 340px;
        width: 85vw;
    }

    .prize-claim-btn {
        padding: 14px 36px;
        font-size: 14px;
    }

    .success-content {
        padding: 24px;
        gap: 14px;
    }

    .success-logo {
        height: 44px;
    }

    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }

    .success-prize-info {
        font-size: 15px;
        padding: 14px 18px;
    }

    .success-prize-info span {
        font-size: 17px;
    }

    .wt-card {
        padding: 0 20px 24px;
        width: 94%;
    }

    .wt-top-strip {
        margin: 0 -20px 20px;
    }

    .wt-logo {
        height: 36px;
        margin-bottom: 14px;
    }

    .wt-time-block {
        min-width: 68px;
        padding: 12px 14px 8px;
    }

    .wt-time-block span {
        font-size: 2.2rem;
    }

    .wt-sep {
        font-size: 1.6rem;
    }

    .wt-note {
        padding: 12px 14px;
    }

    .wt-note p {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .nm-content {
        padding: 20px 16px 16px;
    }

    .nm-logo {
        height: 48px;
        margin-bottom: 10px;
    }

    .nm-title {
        font-size: 17px;
    }

    .nm-slider-inner img {
        height: 130px;
    }

    #nickname-input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .nm-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .cs-cards {
        gap: 14px;
        padding: 0 20px;
        max-width: 360px;
    }

    .reveal-card-wrap {
        max-width: 300px;
    }

    .prize-card-wrap {
        max-width: 300px;
    }

    .prize-claim-btn {
        padding: 12px 28px;
        font-size: 13px;
    }

    .wt-card {
        padding: 0 14px 20px;
    }

    .wt-top-strip {
        margin: 0 -14px 16px;
    }

    .wt-time-block {
        min-width: 60px;
        padding: 10px 10px 8px;
    }

    .wt-time-block span {
        font-size: 1.8rem;
    }

    .wt-sep {
        font-size: 1.3rem;
    }

    .wt-timer {
        gap: 8px;
    }

    .success-prize-info {
        font-size: 14px;
        padding: 12px 14px;
    }

    .success-prize-info span {
        font-size: 15px;
    }
}
