:root {
    --primary-red: #ba3612;
    --dark-red: #700b1b;
    --light-red: #d94825;
    --gold: #f4c430;
    --white: #ffffff;
    --off-white: #f8f8f8;
    --dark-bg: #1a1a1a;
    --text-dark: #333333;
    --shadow: rgba(0, 0, 0, 0.2);
    --shadow-strong: rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Raleway', sans-serif;
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    color: var(--text-dark);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Snow Animation */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: var(--white);
    font-size: 1em;
    opacity: 0.8;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 2;
}

.logo-container {
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 8px var(--shadow-strong));
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 2px 2px 4px var(--shadow-strong);
    margin-bottom: 0.5rem;
    animation: fadeInDown 1s ease 0.2s both;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--off-white);
    font-weight: 400;
    animation: fadeInDown 1s ease 0.4s both;
}

/* Calendar Container */
.calendar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 2;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 1s ease 0.6s both;
}

/* Door Card */
.door-card {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
    animation: doorAppear 0.6s ease both;
}

.door-card:nth-child(1) { animation-delay: 0.1s; }
.door-card:nth-child(2) { animation-delay: 0.15s; }
.door-card:nth-child(3) { animation-delay: 0.2s; }
.door-card:nth-child(4) { animation-delay: 0.25s; }
.door-card:nth-child(5) { animation-delay: 0.3s; }
.door-card:nth-child(6) { animation-delay: 0.35s; }
.door-card:nth-child(7) { animation-delay: 0.4s; }
.door-card:nth-child(8) { animation-delay: 0.45s; }

@keyframes doorAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.door-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.door-card.flipped .door-inner {
    transform: rotateY(180deg);
}

.door-front,
.door-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px var(--shadow);
}

.door-front {
    background: linear-gradient(135deg, var(--white) 0%, var(--off-white) 100%);
    border: 3px solid var(--gold);
}

.door-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(244, 196, 48, 0.1) 100%);
    border-radius: 13px;
    pointer-events: none;
}

.door-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--dark-red);
    text-shadow: 2px 2px 4px var(--shadow);
    position: relative;
    z-index: 1;
}

.door-back {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    transform: rotateY(180deg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid var(--gold);
}

.door-back-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.door-back-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Hover Effects */
.door-card:not(.locked):hover .door-front {
    transform: scale(1.05);
    box-shadow: 0 12px 24px var(--shadow-strong);
}

.door-card:not(.opened):not(.locked):hover {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

/* Locked State */
.door-card.locked {
    cursor: not-allowed;
    opacity: 0.6;
}

.door-card.locked .door-front {
    background: linear-gradient(135deg, #e0e0e0 0%, #cccccc 100%);
    border-color: #999999;
}

.door-card.locked .door-number {
    color: #666666;
}

/* Opened State */
.door-card.opened .door-front {
    opacity: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px var(--shadow-strong);
}

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

.modal-close {
    position: sticky;
    top: 1rem;
    right: 1rem;
    float: right;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    margin-bottom: -40px;
}

.modal-close:hover {
    background: var(--dark-red);
    transform: rotate(90deg);
}

.modal-body {
    padding: 3rem;
}

.modal-body h2 {
    color: var(--dark-red);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.modal-body p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-body iframe {
    width: 100%;
    min-height: 400px;
    border: none;
    border-radius: 8px;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.recipe-section {
    margin: 1.5rem 0;
}

.recipe-section h3 {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.recipe-section ul {
    list-style-position: inside;
    line-height: 1.8;
}

/* Text Content Styles */
.text-content {
    text-align: center;
}

.text-message {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    max-width: 600px;
    margin: 2rem auto;
}

.text-message p {
    margin-bottom: 1.5rem;
}

.text-message p:last-child {
    margin-bottom: 0;
}

/* Optional: Add decorative elements for text content */
.text-content h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--primary-red) 100%);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--off-white);
	opacity: 0.6;
    position: relative;
    z-index: 2;
}

/* Responsive Design */
@media (min-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .main-title {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .calendar-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 767px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .door-number {
        font-size: 3rem;
    }
    
    .modal-body {
        padding: 2rem 1.5rem;
    }
}

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

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

/* Print styles */
@media print {
    .snow-container,
    .modal {
        display: none !important;
    }
}
