/* Noworoczny motyw 2026 */
.newyear-theme {
    --newyear-glow: #ffd700;
    --newyear-shadow: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #f6f3ff;
}

/* Scroll lock applied only when modal is visible */
.newyear-scroll-lock {
    overflow: hidden;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

.newyear-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 5, 25, 0.95);
    backdrop-filter: blur(12px);
    z-index: 9988;
    pointer-events: auto;
    overflow: hidden;
    padding: 0;
}

.newyear-modal {
    width: min(70vw, 950px);
    max-width: 950px;
    height: min(70vh, 700px);
    max-height: 80vh;
    background: #070b1f;
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 3rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), inset 0 0 40px rgba(255, 215, 0, 0.12);
    padding: clamp(2rem, 4vw, 3rem);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-height: 100%;
    overflow: hidden;
}

.newyear-modal .newyear-content {
    width: 100%;
    text-align: center;
    margin: 0 auto;
    max-width: 480px;
    padding: 0 1rem;
}



.newyear-modal h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #ffffff;
    letter-spacing: 0.2rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: fadeInDown 1s ease-out;
    text-align: center;
    margin: 0 auto;
    width: 100%;
    overflow-wrap: anywhere;
}

.newyear-modal .year {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    margin-top: 0.5rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: fadeInUp 1.5s ease-out, glow 2s ease-in-out infinite;
}

.newyear-modal .message {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #e0e0e0;
    margin-top: 1.5rem;
    animation: fadeIn 2s ease-out;
    line-height: 1.4;
}

.newyear-modal .countdown {
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
    color: #ffd700;
    margin-top: 1rem;
    animation: fadeIn 2.5s ease-out;
}

.newyear-modal .countdown-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.newyear-modal .countdown-subtitle {
    color: #c8d0e6;
    margin-bottom: 2rem;
}

.newyear-modal .countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(80px, 1fr));
    gap: 1.25rem;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 2rem;
}

.newyear-modal .countdown-card {
    border-radius: 1.25rem;
    border: 1px solid rgba(76, 139, 255, 0.6);
    background: rgba(10, 20, 45, 0.6);
    box-shadow: 0 0 20px rgba(63, 132, 255, 0.35);
    padding: 1.25rem 0.5rem;
}

.newyear-modal .countdown-value {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    color: #4aa3ff;
    line-height: 1;
}

.newyear-modal .countdown-label {
    margin-top: 0.5rem;
    letter-spacing: 0.1rem;
    font-size: 0.75rem;
    color: #c8d0e6;
}

.newyear-modal .countdown-hint {
    color: #ffd166;
    font-weight: 500;
}

.newyear-modal .close-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(10, 10, 10, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    pointer-events: auto;
}

.newyear-modal .close-btn:hover {
    transform: scale(1.1);
}

.newyear-modal .modal-fireworks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.modal-firework-burst {
    position: absolute;
    inset: 0;
}

.modal-firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700, transparent 70%);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.9);
    animation: modalSpark 1s ease-out forwards;
    transform: translate(calc(var(--dx, 0)), calc(var(--dy, 0)));
}

@keyframes modalSpark {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.6);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--dx, 0) * 1.1), calc(var(--dy, 0) * 1.1)) scale(0.2);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 1));
    }
}

@media (max-width: 768px) {
    .newyear-backdrop {
        padding: 0.5rem;
        align-items: flex-start;
        justify-content: center;
        overflow: hidden;
        padding-top: 3rem;
        padding-bottom: 120px;
        z-index: 9988;
        position: fixed;
        inset: 0;
        min-height: 100vh;
        height: 100vh;
    }

    .newyear-modal {
        width: min(90vw, 480px);
        padding: 1.2rem 1rem;
        border-radius: 1.7rem;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65),
            inset 0 0 16px rgba(255, 215, 0, 0.1);
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 160px);
        margin-top: 1.6rem;
        position: relative;
        top: 0.75rem;
        transform: translateY(0);
        overflow-y: auto;
        padding-bottom: 1rem;
    }

    .newyear-modal .close-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        top: 0.3rem;
        left: 1rem;
    }

    .newyear-modal .year {
        font-size: clamp(3rem, 16vw, 4.5rem);
    }

    .newyear-modal .newyear-content {
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .newyear-modal h1 {
        letter-spacing: 0.1rem;
        font-size: clamp(2rem, 8vw, 2.4rem);
    }

    .newyear-modal .countdown-grid {
        grid-template-columns: repeat(2, minmax(90px, 1fr));
        gap: 0.5rem;
        max-width: 100%;
    }

    .newyear-modal .countdown-hint {
        display: none;
    }

    .newyear-modal [data-view="celebrate"] .countdown {
        display: none;
    }
}
