@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Mountains+of+Christmas:wght@400;700&display=swap');

:root {
    --bg-color: #2c0001; /* Deep Red */
    --door-bg: #8b0000; /* Dark Red */
    --door-hover: #a50000;
    --gold: #d4af37;
    --gold-light: #f9d76e;
    --text-color: #fff;
    --snow-color: rgba(255, 255, 255, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%),
        url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="50" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="20" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    color: var(--text-color);
    font-family: 'Cinzel', serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

h1 {
    font-family: 'Mountains of Christmas', cursive;
    font-size: 4rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    margin-bottom: 2rem;
    text-align: center;
    padding: 0 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    width: 90%;
    max-width: 1000px;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--gold);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.door {
    aspect-ratio: 1;
    background-color: var(--door-bg);
    border: 2px solid var(--gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--gold);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

.door::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px dashed rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}

.door:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 0 20px rgba(0,0,0,0.5);
    background-color: var(--door-hover);
    text-shadow: 0 0 10px var(--gold);
}

.door.locked {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.door.locked:hover {
    transform: none;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.door.opened {
    background-color: #1a0f0f;
    border-color: #555;
    color: #555;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: linear-gradient(135deg, #2c0001, #4a0000);
    border: 4px solid var(--gold);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: var(--gold);
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Cinzel', serif;
}

.modal-title {
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-family: 'Mountains of Christmas', cursive;
}

.modal-body {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #fff;
}

.gift-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Snow effect container */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

@media (max-width: 600px) {
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
    h1 {
        font-size: 2.5rem;
    }
}
