/* ===== ÁÀÇÀ ===== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-main: #050816;
    --bg-card: rgba(9, 16, 36, 0.98);
    --accent: #ff4757;
    --accent-soft: rgba(255, 71, 87, 0.2);
    --accent-gold: #ffd66b;
    --accent-blue: #39c0ff;
    --text-main: #f9fbff;
    --text-muted: #c5c9dd;
    --border-soft: rgba(255, 255, 255, 0.15);
    --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.75);
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;
    --transition-fast: 0.18s ease-out;
    --transition-normal: 0.25s ease-out;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background: #000;
    overflow-x: hidden;
}

/* ===== ÔÎÍ + ÑÍÅÃ ===== */

.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, #27496d 0, transparent 60%),
        radial-gradient(circle at 100% 0%, #3a86ff 0, transparent 55%),
        radial-gradient(circle at 50% 100%, #ff006e 0, transparent 65%),
        linear-gradient(145deg, #050816, #020617);
    z-index: -3;
}

/* Ìåëêèé ñíåã */
.snow-layer {
    pointer-events: none;
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 26px 26px, 42px 42px;
    background-position: 0 0, 13px 21px;
    opacity: 0.33;
    animation: snow-move 40s linear infinite;
    z-index: -2;
}

/* Êðóïíûé ñíåã */
.snow-layer-big {
    pointer-events: none;
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 2px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 2px, transparent 2px);
    background-size: 60px 60px, 80px 80px;
    background-position: 10px 0, 40px 30px;
    opacity: 0.35;
    animation: snow-move-big 18s linear infinite;
    z-index: -1;
}

@keyframes snow-move {
    from {
        transform: translateY(-20px);
    }
    to {
        transform: translateY(20px);
    }
}

@keyframes snow-move-big {
    from {
        transform: translateY(-40px);
    }
    to {
        transform: translateY(40px);
    }
}

/* ===== ÃÈÐËßÍÄÛ ===== */

.garland {
    position: fixed;
    pointer-events: none;
    z-index: 1;
}

.garland-top {
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 10px 20px;
    transform: translateY(0);
}

.garland-top::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    opacity: 0.7;
}

.garland-left,
.garland-right {
    top: 80px;
    bottom: 0;
    width: 70px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.garland-left {
    left: 0;
}

.garland-right {
    right: 0;
}

.bulb {
    width: 14px;
    height: 20px;
    border-radius: 50% 50% 55% 55%;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
    opacity: 0.85;
    animation: bulb-pulse 1.4s infinite alternate;
}

.bulb::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 5px;
    background: #222;
    border-radius: 2px;
    transform: translateY(-4px);
}

.bulb.red {
    background: #ff4b5c;
}

.bulb.yellow {
    background: #ffd66b;
}

.bulb.blue {
    background: #4dabff;
}

.bulb.green {
    background: #2ecc71;
}

.bulb.pink {
    background: #ff8ed4;
}

.garland-top .bulb:nth-child(odd) {
    transform: translateY(10px);
}

.garland-top .bulb:nth-child(even) {
    transform: translateY(0px);
}

.bulb:nth-child(3n) {
    animation-delay: 0.2s;
}
.bulb:nth-child(4n) {
    animation-delay: 0.4s;
}
.bulb:nth-child(5n) {
    animation-delay: 0.6s;
}

@keyframes bulb-pulse {
    0% {
        filter: brightness(0.7);
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
    }
    100% {
        filter: brightness(1.4);
        box-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
    }
}

/* ===== HERO ===== */

.hero {
    min-height: 100vh;
    padding: 28px 20px 40px;
    display: flex;
    flex-direction: column;
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.25), transparent 60%),
        rgba(5, 6, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
}

.logo-icon {
    font-size: 20px;
}

.logo-text {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-content {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    margin-top: 10px;
}

.hero-text h1 {
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.1;
    margin: 0 0 12px;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 18px;
    margin: 0 0 10px;
    color: var(--accent-gold);
    font-weight: 700;
}

.hero-subtitle span {
    text-decoration: underline dashed rgba(255, 234, 167, 0.7);
    text-underline-offset: 3px;
}

.hero-small {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--text-muted);
    max-width: 420px;
}

.hero-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    max-width: 360px;
}

/* ===== ÊÍÎÏÊÈ ===== */

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    border: 0;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast),
        color var(--transition-fast), opacity var(--transition-fast);
    outline: none;
}

.primary-btn {
    background: linear-gradient(135deg, #ff4757, #ff006e);
    color: #fff;
    box-shadow: 0 10px 25px rgba(255, 71, 87, 0.6);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(255, 71, 87, 0.85);
}

.primary-btn:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 6px 18px rgba(255, 71, 87, 0.5);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

.secondary-btn {
    background: rgba(12, 24, 54, 0.9);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.secondary-btn:hover {
    background: rgba(24, 40, 83, 0.98);
}

/* ===== ÏÐÀÂÀß ×ÀÑÒÜ (LOTTIE) ===== */

.hero-visual {
    position: relative;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(255, 139, 197, 0.22), transparent 50%),
        rgba(6, 11, 32, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-lottie {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2), transparent 65%),
        linear-gradient(145deg, #051937, #0b2447);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.badge {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: rgba(7, 22, 44, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--accent-gold);
}

/* ===== ÌÎÄÀËÊÈ ===== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
        rgba(0, 0, 10, 0.75);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 40;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px 22px 20px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    animation: modal-in 0.25s ease-out;
}

.modal.hidden {
    display: none;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.modal-desc {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--text-muted);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: rgba(5, 9, 24, 0.9);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== ÑÏÈÑÎÊ ÏÐÎÂÅÐÎÊ ===== */

.check-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border-radius: 16px;
    background: rgba(19, 29, 64, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.check-label {
    font-size: 13px;
}

.check-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    min-width: 140px;
    justify-content: flex-end;
}

.check-status .text {
    color: var(--text-muted);
}

.check-status.success .text {
    color: var(--accent-gold);
}

.check-status.error .text {
    color: #ff99a3;
}

/* Òî÷êè-ñòàòóñ */

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.dot-pending {
    background: var(--accent-soft);
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
    animation: pulse 1.4s infinite;
}

.dot-success {
    background: #38e38b;
    box-shadow: 0 0 0 0 rgba(56, 227, 139, 0.45);
    animation: pulse-success 1.6s infinite;
}

.dot-error {
    background: #ff6b81;
    box-shadow: 0 0 0 0 rgba(255, 107, 129, 0.5);
    animation: pulse-error 1.4s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

@keyframes pulse-success {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 227, 139, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(56, 227, 139, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 227, 139, 0);
    }
}

@keyframes pulse-error {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 129, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 129, 0);
    }
}

.modal-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.modal-footnote {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== ÏÎÄÀÐÎÊ ===== */

.gift-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 18px;
    align-items: stretch;
}

.gift-animation {
    border-radius: 20px;
    background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.2), transparent 60%),
        linear-gradient(135deg, #091833, #091320);
    min-height: 240px;
    overflow: hidden;
}

.gift-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gift-title {
    margin: 0;
    font-size: 18px;
}

.gift-description {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.gift-meta {
    font-size: 12px;
    color: var(--accent-blue);
    padding: 8px 10px;
    border-radius: 16px;
    background: rgba(10, 21, 50, 0.92);
    border: 1px solid rgba(92, 225, 255, 0.4);
    word-break: break-all;
}

.gift-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.gift-note {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== ÊÎÍÔÅÒÒÈ ===== */

.confetti-container {
    pointer-events: none;
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 45;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 14px;
    border-radius: 3px;
    opacity: 0.95;
    animation-name: confetti-fall;
    animation-timing-function: linear;
    animation-iteration-count: 1;
}

@keyframes confetti-fall {
    0% {
        transform: translate3d(0, -20px, 0) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translate3d(0, 120vh, 0) rotateZ(260deg);
        opacity: 0;
    }
}

/* ===== ÀÄÀÏÒÈÂ ===== */

@media (max-width: 880px) {
    .hero-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .hero-visual {
        order: -1;
    }

    .hero {
        padding-top: 24px;
    }

    .garland-left,
    .garland-right {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero {
        padding-inline: 14px;
    }

    .hero-visual {
        padding: 14px;
        min-height: 220px;
    }

    .modal {
        padding-inline: 16px;
    }

    .gift-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .gift-animation {
        min-height: 220px;
    }
}
