:root {
    --red: #9b1c1c;
    --green: #1f6b4a;
    --gold: #d4af37;
    --bg: #f7f3ec;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: #222;
    padding: 1rem;
    min-height: 100vh;
}

.title {
    text-align: center;
    margin-bottom: 1rem;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.door {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--red), #7a1212);
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.door:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
}

.door.opened {
    background: linear-gradient(135deg, var(--green), #174f37);
    color: var(--gold);
}

/* Modal */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.open {
    display: flex;
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    padding: 1.5rem 1rem 1rem 1rem;
    animation: pop 0.25s ease;
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 12px;
}

.modal-text {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.4;
}

.close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
}

/* Reset link */

.reset-link {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
}

.reset-link:hover {
    text-decoration: underline;
}

@keyframes pop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}