/* CSS Variables для кольорів та розмірів */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #1e293b;
    --bg-tertiary: #0f172a;
    --color-gold: #eab308;
    --color-gold-light: #fbbf24;
    --color-silver: #94a3b8;
    --color-silver-light: #cbd5e1;
    --color-red: #ef4444;
    --color-red-light: #fca5a5;
    --color-white: #ffffff;
    --color-text: #e2e8f0;
    --color-text-muted: #64748b;
    
    --font-family: 'Montserrat', sans-serif;
    --container-max-width: 1200px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Reset та базові стилі */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Сніжинки анімація */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: var(--color-white);
    user-select: none;
    pointer-events: none;
    animation: snowfall linear infinite;
}

.snowflake:nth-child(1) { left: 10%; font-size: 20px; animation-duration: 8s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; font-size: 25px; animation-duration: 10s; animation-delay: 1s; }
.snowflake:nth-child(3) { left: 30%; font-size: 15px; animation-duration: 6s; animation-delay: 2s; }
.snowflake:nth-child(4) { left: 40%; font-size: 30px; animation-duration: 12s; animation-delay: 0.5s; }
.snowflake:nth-child(5) { left: 50%; font-size: 18px; animation-duration: 9s; animation-delay: 1.5s; }
.snowflake:nth-child(6) { left: 60%; font-size: 22px; animation-duration: 7s; animation-delay: 3s; }
.snowflake:nth-child(7) { left: 70%; font-size: 16px; animation-duration: 11s; animation-delay: 2.5s; }
.snowflake:nth-child(8) { left: 80%; font-size: 28px; animation-duration: 8s; animation-delay: 4s; }
.snowflake:nth-child(9) { left: 90%; font-size: 20px; animation-duration: 10s; animation-delay: 1s; }
.snowflake:nth-child(10) { left: 95%; font-size: 24px; animation-duration: 9s; animation-delay: 3.5s; }

@keyframes snowfall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* Новорічні іграшки */
.christmas-ornaments {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000; /* Високий z-index щоб бути поверх всього */
}

.ornament {
    position: absolute;
    width: 60px;
    height: 60px;
    cursor: pointer;
    pointer-events: auto;
    transition: var(--transition);
    animation: ornamentFloat 6s ease-in-out infinite;
    border: 2px solid transparent; /* Додаємо невидиму рамку для тестування */
}

.ornament:hover {
    transform: scale(1.1);
    animation-play-state: paused;
    border-color: var(--color-gold); /* Показуємо рамку при наведенні */
}

.ornament:active {
    transform: scale(0.95);
}

.ornament-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.5));
    transition: var(--transition);
}

.ornament:hover .ornament-svg {
    filter: drop-shadow(0 0 20px rgba(234, 179, 8, 0.8));
    animation: pulse 0.5s ease-in-out infinite alternate;
}

.ornament-1 { top: 15%; left: 5%; animation-delay: 0s; }
.ornament-2 { top: 25%; right: 8%; animation-delay: 1s; }
.ornament-3 { top: 45%; left: 3%; animation-delay: 2s; }
.ornament-4 { top: 65%; right: 5%; animation-delay: 3s; }
.ornament-5 { top: 80%; left: 10%; animation-delay: 4s; }

@keyframes ornamentFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes ornamentBounce {
    0% { transform: scale(1) translateY(0px); }
    50% { transform: scale(1.3) translateY(-15px); }
    100% { transform: scale(1) translateY(0px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.new-year-banner {
    background: linear-gradient(135deg, var(--color-red), var(--color-red-light));
    color: var(--color-white);
    text-align: center;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid var(--color-gold);
    animation: bannerGlow 2s ease-in-out infinite alternate;
}

@keyframes bannerGlow {
    0% { box-shadow: 0 0 5px rgba(234, 179, 8, 0.3); }
    100% { box-shadow: 0 0 15px rgba(234, 179, 8, 0.6); }
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-gold);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--color-gold-light);
    text-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--color-silver);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--color-gold);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    color: var(--bg-primary);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.user-icon {
    width: 18px;
    height: 18px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-gold);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    position: relative;
    z-index: 10;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--color-silver);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Таймер зворотного відліку */
.countdown-timer {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.countdown-item {
    text-align: center;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid var(--color-gold);
    min-width: 80px;
    transition: var(--transition);
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.countdown-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-red), var(--color-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown-label {
    font-size: 14px;
    color: var(--color-silver);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-item.urgent .countdown-number {
    background: linear-gradient(135deg, var(--color-red), var(--color-red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: urgentPulse 1s ease-in-out infinite;
}

@keyframes urgentPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* CTA Button */
.cta-button {
    padding: 18px 36px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    color: var(--bg-primary);
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button.primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.cta-button.secondary {
    background: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
}

.cta-button.secondary:hover {
    background: var(--color-gold);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* Hero Illustration */
.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.gift-box {
    width: 300px;
    height: 300px;
    animation: giftPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(234, 179, 8, 0.3));
}

@keyframes giftPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(2deg); }
}

/* Steps Section */
.steps {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 60px;
}

.steps-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.steps-line {
    display: none; /* Приховуємо вертикальну лінію */
}

.christmas-star {
    display: none; /* Приховуємо зірку, оскільки вона була частиною лінії */
}

@keyframes starTwinkle {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(180deg); }
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
    position: relative;
    z-index: 3;
}

.step-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-item:nth-child(even) {
    flex-direction: row-reverse;
}

.step-item:nth-child(even) .step-content {
    text-align: right;
    padding-right: 60px;
    padding-left: 0;
}

.step-item:nth-child(odd) .step-content {
    padding-left: 60px;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border: 3px solid var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    flex-shrink: 0;
    transition: var(--transition);
    z-index: 2;
    position: relative;
}

.step-icon svg {
    width: 32px;
    height: 32px;
}

.step-item.visible .step-icon {
    animation: iconBounce 0.6s ease-out;
}

@keyframes iconBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: 15px;
}

.step-content p {
    color: var(--color-silver);
    font-size: 16px;
    line-height: 1.6;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--bg-tertiary);
    position: relative;
    z-index: 10;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(50px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--color-gold);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--bg-primary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(10deg);
}

.feature-icon svg {
    width: 36px;
    height: 36px;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--color-silver);
    line-height: 1.6;
}

/* Video Section */
.video-section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.video-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 3px solid var(--color-gold);
    box-shadow: var(--shadow);
}

.video-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.video-placeholder:hover {
    transform: scale(1.02);
}

.play-button {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--bg-primary);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.play-button svg {
    width: 40px;
    height: 40px;
    margin-left: 5px;
}

.video-overlay {
    position: absolute;
    bottom: 30px;
    left: 30px;
    color: var(--color-white);
}

.video-overlay h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.video-overlay p {
    color: var(--color-silver);
}

.video-description {
    text-align: center;
    margin-top: 30px;
    color: var(--color-silver);
    font-size: 18px;
}

/* Roadmap Section */
.roadmap {
    padding: 100px 0;
    background: var(--bg-tertiary);
    position: relative;
    z-index: 10;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px;
    margin-top: 60px;
}

.roadmap-item {
    display: flex;
    align-items: center;
    gap: 40px;
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition);
}

.roadmap-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.roadmap-item:nth-child(even) {
    flex-direction: row-reverse;
    transform: translateX(50px);
}

.roadmap-item:nth-child(even).visible {
    transform: translateX(0);
}

.roadmap-illustration {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-gold);
}

.ukraine-map, .community-templates, .price-chart {
    width: 100%;
    height: 100%;
}

/* Анімації для графіка цін - повторюваний цикл */
.price-chart .price-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLineLoop 6s ease-in-out infinite;
}

.price-chart .line-1 {
    animation-delay: 0s;
}

.price-chart .line-2 {
    animation-delay: 0.5s;
}

.price-chart .line-3 {
    animation-delay: 1s;
}

@keyframes drawLineLoop {
    0% {
        stroke-dashoffset: 200;
        opacity: 0.3;
    }
    15% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    85% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    100% {
        stroke-dashoffset: -200;
        opacity: 0.3;
    }
}

.price-chart .price-point {
    opacity: 0;
    animation: pointPulseLoop 6s ease-in-out infinite;
}

.price-chart .point-1-1 { animation-delay: 0.2s; }
.price-chart .point-1-2 { animation-delay: 0.4s; }
.price-chart .point-1-3 { animation-delay: 0.6s; }
.price-chart .point-1-4 { animation-delay: 0.8s; }
.price-chart .point-1-5 { animation-delay: 1s; }

.price-chart .point-2-1 { animation-delay: 0.7s; }
.price-chart .point-2-2 { animation-delay: 0.9s; }
.price-chart .point-2-3 { animation-delay: 1.1s; }
.price-chart .point-2-4 { animation-delay: 1.3s; }
.price-chart .point-2-5 { animation-delay: 1.5s; }

.price-chart .point-3-1 { animation-delay: 1.2s; }
.price-chart .point-3-2 { animation-delay: 1.4s; }
.price-chart .point-3-3 { animation-delay: 1.6s; }
.price-chart .point-3-4 { animation-delay: 1.8s; }
.price-chart .point-3-5 { animation-delay: 2s; }

@keyframes pointPulseLoop {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    20% {
        opacity: 1;
        transform: scale(1.2);
    }
    25% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
        transform: scale(1.3);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.price-chart .chart-legend {
    animation: legendPulse 6s ease-in-out infinite;
}

@keyframes legendPulse {
    0%, 20% {
        opacity: 0.5;
    }
    30%, 70% {
        opacity: 1;
    }
    80%, 100% {
        opacity: 0.5;
    }
}

/* Додаткові ефекти для циклічної анімації */
.price-chart .chart-grid {
    animation: gridPulse 6s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.4;
    }
}

/* Анімація фону графіка */
.price-chart rect:first-child {
    animation: backgroundPulse 6s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% {
        fill: #1e293b;
    }
    50% {
        fill: #0f172a;
    }
}

/* Інтерактивність графіка */
.price-chart .price-point {
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-chart .price-point:hover {
    transform: scale(1.5);
    filter: drop-shadow(0 0 5px currentColor);
}

.roadmap-item:hover .price-tooltips {
    opacity: 1 !important;
    animation: tooltipPulse 2s ease-in-out infinite;
}

@keyframes tooltipPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Додаткові циклічні ефекти */
.price-chart .price-line {
    filter: drop-shadow(0 0 3px currentColor);
}

.price-chart .line-1 {
    animation: drawLineLoop 6s ease-in-out infinite, 
               colorShift1 6s ease-in-out infinite;
}

.price-chart .line-2 {
    animation: drawLineLoop 6s ease-in-out infinite 0.5s, 
               colorShift2 6s ease-in-out infinite 0.5s;
}

.price-chart .line-3 {
    animation: drawLineLoop 6s ease-in-out infinite 1s, 
               colorShift3 6s ease-in-out infinite 1s;
}

@keyframes colorShift1 {
    0%, 100% { stroke: #eab308; }
    33% { stroke: #fbbf24; }
    66% { stroke: #f59e0b; }
}

@keyframes colorShift2 {
    0%, 100% { stroke: #ef4444; }
    33% { stroke: #fca5a5; }
    66% { stroke: #f87171; }
}

@keyframes colorShift3 {
    0%, 100% { stroke: #22c55e; }
    33% { stroke: #4ade80; }
    66% { stroke: #16a34a; }
}

/* Анімація тексту цін */
.price-chart text {
    animation: textFade 6s ease-in-out infinite;
}

@keyframes textFade {
    0%, 20% { opacity: 0.6; }
    40%, 60% { opacity: 1; }
    80%, 100% { opacity: 0.6; }
}

/* Ефект "дихання" для всього графіка */
.roadmap-item .price-chart {
    animation: chartBreathe 8s ease-in-out infinite;
}

@keyframes chartBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.roadmap-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: 15px;
}

.roadmap-content p {
    color: var(--color-silver);
    line-height: 1.6;
}

/* Final CTA Section */
.final-cta {
    padding: 100px 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 20px;
}

.cta-subtitle {
    font-size: 20px;
    color: var(--color-silver);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.quick-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--color-silver);
    font-size: 16px;
    padding: 20px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(251, 191, 36, 0.05));
    border: 1px solid rgba(234, 179, 8, 0.2);
    transition: all 0.3s ease;
    animation: quickLinkPulse 3s ease-in-out infinite;
}

.quick-link:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(251, 191, 36, 0.1));
    border-color: rgba(234, 179, 8, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(234, 179, 8, 0.2);
}

/* Стилі для іконки лайфхаку - з високим пріоритетом */
.final-cta .quick-link .link-icon,
.cta-content .quick-link .link-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: none !important;
    max-height: none !important;
    animation: lightBulbGlow 1.5s ease-in-out infinite alternate !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

.final-cta .quick-link:hover .link-icon,
.cta-content .quick-link:hover .link-icon {
    transform: scale(1.3) !important;
    animation-duration: 0.8s !important;
}

@keyframes quickLinkPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(234, 179, 8, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(234, 179, 8, 0.2);
    }
}

.quick-link .link-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    animation: lightBulbGlow 1.5s ease-in-out infinite alternate;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.quick-link:hover .link-icon {
    transform: scale(1.2) !important;
    animation-duration: 0.8s;
}

@keyframes lightBulbGlow {
    0% {
        filter: drop-shadow(0 0 5px var(--color-gold)) drop-shadow(0 0 10px rgba(234, 179, 8, 0.3));
        color: var(--color-gold);
        transform: rotate(-5deg);
    }
    100% {
        filter: drop-shadow(0 0 15px var(--color-gold-light)) drop-shadow(0 0 25px rgba(251, 191, 36, 0.6));
        color: var(--color-gold-light);
        transform: rotate(5deg);
    }
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 10px;
}

.footer-slogan {
    color: var(--color-silver);
    font-style: italic;
}

.offer-details {
    color: var(--color-silver);
    margin-bottom: 30px;
    line-height: 1.6;
}

.contacts {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-silver);
    text-decoration: none;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--color-gold);
}

.contact-link svg {
    width: 20px;
    height: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-silver);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--color-gold);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    border-top: 1px solid var(--color-text-muted);
    padding-top: 30px;
    text-align: center;
}

.copyright {
    color: var(--color-text-muted);
}

/* Ялинкова гілка в футері */
.footer-branch {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 50px;
}

.branch-svg {
    width: 100%;
    height: 100%;
}

.branch-ornament {
    animation: branchTwinkle 2s ease-in-out infinite alternate;
}

.branch-ornament:nth-child(even) {
    animation-delay: 1s;
}

@keyframes branchTwinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Анімації появи */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивний дизайн */
@media (max-width: 1024px) {
    .ornament {
        width: 50px;
        height: 50px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .gift-box {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    /* Ховаємо 50% іграшок на мобільних */
    .ornament-2, .ornament-4 {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Мобільне меню активне */
    .nav-menu.active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 999;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .countdown-timer {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .countdown-item {
        min-width: 70px;
        padding: 15px;
    }
    
    .countdown-number {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    /* Покроковий майстер стає горизонтальним свайпом */
    .steps-container {
        overflow-x: auto;
        padding-bottom: 20px;
    }
    
    .steps-line {
        display: none;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
        min-width: 280px;
        margin-right: 30px;
        margin-bottom: 0;
    }
    
    .step-item:nth-child(even) {
        flex-direction: column;
    }
    
    .step-content {
        padding: 20px 0 0 0 !important;
        text-align: center !important;
    }
    
    /* Фішки перетворюються на карусель */
    .features-grid {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding-bottom: 20px;
        scroll-snap-type: x mandatory;
    }
    
    .feature-card {
        min-width: 280px;
        scroll-snap-align: start;
    }
    
    .roadmap-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .roadmap-item {
        flex-direction: column;
        text-align: center;
        transform: translateY(50px);
    }
    
    .roadmap-item:nth-child(even) {
        flex-direction: column;
        transform: translateY(50px);
    }
    
    .roadmap-item.visible {
        transform: translateY(0);
    }
    
    .cta-title {
        font-size: 32px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .contacts {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .countdown-timer {
        gap: 10px;
    }
    
    .countdown-item {
        min-width: 60px;
        padding: 12px;
    }
    
    .countdown-number {
        font-size: 20px;
    }
    
    .countdown-label {
        font-size: 12px;
    }
    
    .cta-button {
        padding: 15px 30px;
        font-size: 16px;
    }
    
    .gift-box {
        width: 200px;
        height: 200px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .step-content h3 {
        font-size: 20px;
    }
    
    .feature-card {
        min-width: 260px;
        padding: 30px 20px;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .cta-subtitle {
        font-size: 18px;
    }
    
    /* Покращення для дуже маленьких екранів */
    .new-year-banner {
        font-size: 12px;
        padding: 6px 15px;
    }
    
    .nav {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .login-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .steps, .features, .video-section, .roadmap, .final-cta {
        padding: 60px 0;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
}

/* Додаткові стилі для покращення UX */
@media (max-width: 360px) {
    .countdown-timer {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 10px;
    }
    
    .countdown-item {
        min-width: auto;
    }
    
    .hero-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .cta-title {
        font-size: 24px;
    }
    
    .feature-card {
        min-width: 240px;
        padding: 25px 15px;
    }
    
    .feature-card h3 {
        font-size: 18px;
    }
    
    .step-content h3 {
        font-size: 18px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .snowflakes {
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --color-gold: #ffff00;
        --color-silver: #ffffff;
        --color-red: #ff0000;
        --bg-primary: #000000;
        --bg-secondary: #333333;
    }
}

/* Focus styles for keyboard navigation */
.cta-button:focus,
.login-btn:focus,
.nav-link:focus,
.contact-link:focus,
.social-link:focus {
    outline: 3px solid var(--color-gold);
    outline-offset: 2px;
}

.ornament:focus {
    outline: 2px solid var(--color-gold);
    outline-offset: 4px;
    border-radius: 50%;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-gold);
    color: var(--bg-primary);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading animation improvements */
body.loading .hero-title,
body.loading .hero-subtitle,
body.loading .countdown-timer,
body.loading .cta-button {
    opacity: 0;
    transform: translateY(20px);
}

body.loaded .hero-title {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

body.loaded .hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

body.loaded .countdown-timer {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

body.loaded .cta-button {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

/* Enhanced hover effects */
.feature-card:hover .feature-icon {
    animation: iconWobble 0.6s ease-in-out;
}

@keyframes iconWobble {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

/* Improved button animations */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

/* Enhanced countdown urgency */
.countdown-item.urgent {
    animation: urgentShake 0.5s ease-in-out infinite;
    border-color: var(--color-red);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

@keyframes urgentShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Improved mobile menu animation */
@media (max-width: 768px) {
    .nav-menu.active {
        animation: mobileMenuSlide 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    }
    
    @keyframes mobileMenuSlide {
        0% {
            transform: translateY(-100%);
            opacity: 0;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .nav-menu.active .nav-link {
        animation: mobileMenuItemFade 0.3s ease-out both;
    }
    
    .nav-menu.active .nav-link:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu.active .nav-link:nth-child(2) { animation-delay: 0.2s; }
    .nav-menu.active .nav-link:nth-child(3) { animation-delay: 0.3s; }
    .nav-menu.active .nav-link:nth-child(4) { animation-delay: 0.4s; }
    
    @keyframes mobileMenuItemFade {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Video Tutorial Buttons - Optimized with Pulse Animation */
.video-tutorial-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    transition: transform 0.15s ease;
    will-change: transform;
    contain: layout style paint;
    
    /* Пульсуюча анімація */
    animation: videoPulse 2s ease-in-out infinite;
}

/* Keyframes для пульсуючої анімації */
@keyframes videoPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.3), 
                    0 0 15px rgba(239, 68, 68, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Додаткова анімація для іконки відтворення */
@keyframes playIconPulse {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 1));
    }
}

.video-tutorial-btn .play-icon {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    animation: playIconPulse 2s ease-in-out infinite;
}

.video-tutorial-btn:hover {
    transform: scale(1.1);
    animation-play-state: paused; /* Зупиняємо пульсацію при hover */
}

.video-tutorial-btn:focus {
    outline: 2px solid #eab308;
    outline-offset: 2px;
    animation-play-state: paused; /* Зупиняємо пульсацію при focus */
}

/* Responsive adjustments for video buttons */
@media (max-width: 768px) {
    .video-tutorial-btn {
        width: 44px;
        height: 44px;
        top: -10px;
        right: -10px;
        
        /* Менш інтенсивна анімація для мобільних */
        animation: videoPulseMobile 3s ease-in-out infinite;
    }
    
    /* Більш м'яка анімація для мобільних пристроїв */
    @keyframes videoPulseMobile {
        0% {
            transform: scale(1);
            box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
        }
        50% {
            transform: scale(1.03);
            box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.2);
        }
        100% {
            transform: scale(1);
            box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        }
    }
}

@media (max-width: 480px) {
    .video-tutorial-btn {
        width: 44px;
        height: 44px;
        top: -12px;
        right: -12px;
        
        /* Ще більш м'яка анімація для маленьких екранів */
        animation: videoPulseSmall 4s ease-in-out infinite;
    }
    
    /* Дуже м'яка анімація для маленьких екранів */
    @keyframes videoPulseSmall {
        0% {
            transform: scale(1);
            box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        }
        50% {
            transform: scale(1.02);
            box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
        }
        100% {
            transform: scale(1);
            box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        }
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .video-tutorial-btn {
        background: #ff0000;
        border: 2px solid #ffffff;
    }
    
    .play-icon circle {
        fill: #ff0000;
    }
    
    .play-icon polygon {
        fill: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .video-tutorial-btn {
        animation: none; /* Вимикаємо пульсацію */
    }
    
    .video-tutorial-btn .play-icon {
        animation: none; /* Вимикаємо анімацію іконки */
    }
    
    .video-tutorial-btn:hover {
        transform: none; /* Вимикаємо hover ефект */
    }
}

/* Video Tutorial Modal - Optimized */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
    contain: layout style paint;
    will-change: opacity, visibility;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    cursor: pointer;
    contain: strict;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 80%;
    max-height: 600px;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.25s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    contain: layout style paint;
    will-change: transform;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: scale(1.05);
}

.video-modal-close:focus {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.video-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--color-text);
    contain: layout style paint;
}

.video-modal-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(234, 179, 8, 0.3);
    border-top: 4px solid #eab308;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.video-modal-loading p {
    font-size: 16px;
    margin: 0;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: none;
    background: #000;
}

.video-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* YouTube iframe responsive aspect ratio maintenance */
.video-container::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: -1;
}

/* Ensure iframe fills container properly */
.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loading state improvements */
.video-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--color-text);
    z-index: 2;
}

/* Error state styling */
.video-error,
.error-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--color-text);
    text-align: center;
    padding: 20px;
    z-index: 2;
}

.error-message .error-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.error-message h3 {
    color: var(--color-red);
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.error-message p {
    margin-bottom: 12px;
    color: var(--color-silver);
    line-height: 1.5;
}

.error-message ul {
    text-align: left;
    margin: 12px 0;
    padding-left: 20px;
    color: var(--color-silver);
}

.error-message li {
    margin-bottom: 4px;
}

.error-message .error-link {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid var(--color-gold);
    border-radius: 6px;
    display: inline-block;
    margin: 8px;
    transition: all 0.2s ease;
}

.error-message .error-link:hover,
.error-message .error-link:focus {
    background: var(--color-gold);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.error-message .retry-button {
    background: var(--bg-secondary);
    color: var(--color-text);
    border: 2px solid var(--color-silver);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.error-message .retry-button:hover,
.error-message .retry-button:focus {
    border-color: var(--color-gold);
    color: var(--color-gold);
    transform: translateY(-2px);
}

.video-error a {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid var(--color-gold);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.video-error a:hover {
    background: var(--color-gold);
    color: var(--bg-primary);
}

/* Error message styles */
.error-message {
    text-align: center;
    padding: 20px;
}

.error-message p {
    margin: 8px 0;
    color: var(--color-text);
}

.error-message a {
    color: #eab308;
    text-decoration: none;
    font-weight: 600;
}

.error-message a:hover {
    text-decoration: underline;
}

/* Enhanced Responsive Modal Styles */

/* Desktop and Large Screens (1200px+) */
@media (min-width: 1200px) {
    .video-modal-content {
        width: 80%;
        max-width: 1000px;
        height: 80%;
        max-height: 700px;
    }
}

/* Desktop (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .video-modal-content {
        width: 85%;
        max-width: 900px;
        height: 80%;
        max-height: 650px;
    }
}

/* Tablet Landscape (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .video-modal-content {
        width: 90%;
        max-width: 800px;
        height: 85%;
        max-height: 600px;
    }
    
    .video-modal-close {
        width: 44px;
        height: 44px;
        top: 16px;
        right: 16px;
        font-size: 22px;
    }
    
    /* Ensure minimum YouTube iframe size */
    .video-iframe {
        min-height: 400px;
    }
}

/* Tablet Portrait and Mobile Landscape (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .video-modal-content {
        width: 95%;
        height: 90%;
        max-height: none;
        border-radius: 10px;
    }
    
    .video-modal-close {
        width: 44px;
        height: 44px;
        top: 12px;
        right: 12px;
        font-size: 20px;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .video-modal-close:hover {
        background: rgba(0, 0, 0, 0.95);
    }
    
    /* YouTube iframe responsive sizing */
    .video-iframe {
        min-height: 300px;
        aspect-ratio: 16/9;
    }
    
    .video-modal-loading {
        padding: 24px;
    }
    
    .video-modal-loading .spinner {
        width: 36px;
        height: 36px;
    }
    
    .video-modal-loading p {
        font-size: 16px;
        margin-top: 16px;
    }
}

/* Mobile-specific modal optimizations */
@media (max-width: 480px) {
    .video-modal {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }
    
    .video-modal-content {
        width: 98%;
        height: 95%;
        max-height: none;
        border-radius: 8px;
        margin: 1% auto;
    }
    
    .video-modal-close {
        width: 44px;
        height: 44px;
        top: 8px;
        right: 8px;
        font-size: 18px;
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    .video-modal-close:hover {
        background: rgba(0, 0, 0, 1);
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    /* Mobile-optimized YouTube iframe */
    .video-iframe {
        min-height: 250px;
        aspect-ratio: 16/9;
    }
    
    .video-modal-loading {
        padding: 20px;
    }
    
    .video-modal-loading .spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .video-modal-loading p {
        font-size: 14px;
        margin-top: 12px;
    }
    
    /* Prevent body scroll on mobile when modal is open */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* Improve touch scrolling within modal if needed */
    .video-modal-content {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
}

/* Very Small Mobile Screens (max 360px) */
@media (max-width: 360px) {
    .video-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .video-modal-close {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
        font-size: 16px;
    }
    
    .video-iframe {
        min-height: 200px;
    }
    
    .video-modal-loading {
        padding: 16px;
    }
    
    .video-modal-loading .spinner {
        width: 28px;
        height: 28px;
    }
    
    .video-modal-loading p {
        font-size: 13px;
    }
}

/* Landscape Orientation Optimizations */
@media (orientation: landscape) and (max-height: 600px) {
    .video-modal-content {
        height: 95%;
        max-height: none;
    }
    
    .video-iframe {
        height: calc(100% - 60px); /* Account for close button */
    }
    
    .video-modal-close {
        position: fixed;
        z-index: 1001;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .video-modal-close {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Touch Device Optimizations */
@media (pointer: coarse) {
    .video-modal-close {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }
    
    /* Larger touch targets for mobile */
    .video-modal-backdrop {
        cursor: pointer;
    }
}

/* Hover-capable Device Optimizations */
@media (hover: hover) {
    .video-modal-close:hover {
        transform: scale(1.05);
    }
}

/* Safe area insets for devices with notches */
@supports (padding: max(0px)) {
    .video-modal-content {
        padding-top: max(16px, env(safe-area-inset-top));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    
    .video-modal-close {
        top: max(16px, env(safe-area-inset-top));
        right: max(16px, env(safe-area-inset-right));
    }
}

/* Print Styles for Modal */
@media print {
    .video-modal {
        display: none !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .video-modal,
    .video-modal-content {
        transition: none;
    }
    
    .video-modal-loading .spinner {
        animation: none;
        border: 4px solid #eab308;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .video-modal-backdrop {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .video-modal-content {
        border: 2px solid #ffffff;
    }
    
    .video-modal-close {
        background: #000000;
        border: 2px solid #ffffff;
    }
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .snowflakes,
    .christmas-ornaments,
    .header,
    .footer-branch,
    .video-tutorial-btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section-title,
    .hero-title,
    .cta-title {
        color: black;
    }
}
/* Стилі для повідомлень про локальний запуск */
.local-solutions {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--color-gold);
}

.local-solutions h4 {
    color: var(--color-gold);
    margin-bottom: 10px;
}

.local-solutions ol {
    text-align: left;
    padding-left: 20px;
}

.local-solutions li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.local-solutions code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--color-gold);
}

.error-message {
    text-align: center;
    padding: 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.error-link {
    display: inline-block;
    background: var(--color-gold);
    color: var(--bg-primary);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin: 10px;
    transition: all 0.3s ease;
}

.error-link:hover {
    background: var(--color-silver);
    transform: translateY(-2px);
}

.retry-button {
    background: var(--bg-tertiary);
    color: var(--color-text);
    border: 1px solid var(--color-silver);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background: var(--color-silver);
    color: var(--bg-primary);
}