* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 50%, #98D8C8 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

/* Снежинки на фоне */
.snowflake {
    position: fixed;
    color: white;
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 10px)) rotate(360deg);
        opacity: 0;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Домик */
.house {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Крыша */
.roof {
    position: relative;
    width: 100%;
    height: 150px;
    margin-bottom: -1px;
    overflow: visible;
}

.roof::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #8B4513;
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.roof::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: calc(100% + 2px);
    background: #A0522D;
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

/* Тело домика */
.house-body {
    background: linear-gradient(to bottom, #F5DEB3 0%, #DEB887 100%);
    border: 4px solid #8B4513;
    border-top: none;
    border-radius: 0 0 15px 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Подпись внизу домика */
.house-footer {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-style: italic;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.door {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.door:hover:not(.locked) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.door.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    animation: pulse 2s infinite;
}

.door.past {
    background: linear-gradient(135deg, #868e96 0%, #495057 100%);
    opacity: 0.7;
}

.door.locked {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    cursor: not-allowed;
    opacity: 0.5;
}

.door.locked:hover {
    transform: none;
}

.door.opened {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.door-number {
    font-size: 1.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.door.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    z-index: 2;
    pointer-events: none;
}

.door.locked .door-number {
    opacity: 0.3;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 25px rgba(79, 172, 254, 0.6);
    }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    text-align: center;
    padding-top: 20px;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.audio-container {
    margin-bottom: 20px;
}

.audio-container audio {
    width: 100%;
    max-width: 500px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.download-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.modal-body p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333;
}

/* Адаптивность */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .roof {
        height: 120px;
    }
    
    .house-body::before {
        width: 60px;
        height: 80px;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    
    .door {
        font-size: 1.2rem;
    }
    
    .door-number {
        font-size: 1rem;
    }
    
    .modal-content {
        padding: 20px;
    }
}
