body {
    font-family: 'Arial', sans-serif;
    text-align: center;
    margin: 0;
    padding: 20px;
    position: relative;
    background-color: transparent;
    min-height: 100vh;
    z-index: 2;
}

html, body, .modal {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.modal::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('image/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

h1 {
    margin-bottom: 30px;
    position: relative;
    z-index: 3;
    background-color: transparent;
    padding: 10px 0;
    display: block;
}

h1 img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-content: center;
    gap: 5px;
    max-width: 790px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background-color: transparent;
    padding: 0;
    box-shadow: none;
}

.day-door {
    background-color: transparent;
    color: #1a1a1a;
    padding: 0 0 25px 0;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: none;
    border: 1px dotted #ffffff;
    transition: transform 0.1s;
    aspect-ratio: 1 / 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    background-size: 80%;
    background-position: center 5px;
    background-repeat: no-repeat;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.calendar-box {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.calendar-box img {
    width: 145px;
    height: 145px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}

.day-door:hover:not(.locked) {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.day-door.locked {
    background-color: transparent;
    cursor: not-allowed;
    color: #aaa;
    background-image: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
}

.day-number-text {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2em;
    font-weight: normal;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 1);
    z-index: 10;
    font-family: 'Black Han Sans', sans-serif;
}

.admin-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-button {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.admin-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 1.0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.admin-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 50vw;
    max-width: 80%;
    min-width: 300px;
    text-align: left;
    position: relative;
}

#modalStory {
    white-space: pre-wrap;
}

.modal-content h2,
.modal-content p {
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
    width: 100%;
}

.modal-content h2 {
    margin-top: 20px;
}

.modal-content .modal-image {
    width: auto;
    display: block;
    margin: 15px auto;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
}

.snowflake {
    position: fixed;
    top: -10px;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
    animation-name: snow;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes snow {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(0, 100vh, 0); }
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
        padding: 8px 0;
        margin-bottom: 20px;
    }

    h1 img {
        max-width: 90%;
    }

    .calendar-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 3px;
        max-width: 100%;
        padding: 0 10px;
    }

    .day-door {
        padding: 0 0 20px 0;
        border-width: 1px;
        background-size: 70%;
        background-position: center 3px;
    }

    .calendar-box img {
        width: 70px;
        height: 70px;
        border-radius: 6px;
        object-fit: contain;
        display: block;
    }

    .day-number-text {
        font-size: 0.75em;
        bottom: 3px;
    }

    .admin-button-container {
        top: 12px;
        right: 12px;
    }

    .admin-button {
        padding: 6px 12px;
        font-size: 11px;
    }

    .modal-content {
        width: 90vw;
        max-width: 90%;
        min-width: auto;
        margin: 15% auto;
        padding: 15px;
    }

    .modal-content .modal-image {
        margin: 15px auto;
        padding-left: 5px;
        padding-right: 5px;
    }
}