:root {
    --header-font: 'Roboto', sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    overflow: auto;
}

header {
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.9) 0%,
        rgba(43, 32, 14, 0.9) 100%);
    color: #f8e4c6;
    text-align: center;
    padding: 20px 0;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #d4b36a;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

h1 {
    font-family: "Bona Nova SC", serif;
    font-size: 1.5rem;
    margin: 0;
    padding: 0px 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5),
                 0 0 20px rgba(212, 179, 106, 0.3);
    letter-spacing: 2px;
    color: #d4b36a;
}

.minigame-iframe {
    width: 100%;
    height: 450px;
    border: none;
}

.background {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0a1929;
    background-image: url('images/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px 0;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    max-width: 1200px;
    width: 90%;
    padding: 0px;
    margin-top: 20px;
}

@media (min-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr);
    }
    
    /* Reverse even rows using flex */
    .grid-container {
        display: grid;
        grid-auto-flow: row;
    }
    
    /* Create row groups */
    .grid-container {
        display: flex;
        flex-wrap: wrap;
    }
    
    /* Style each row */
    .grid-container > * {
        width: calc(16.666% - 10px); /* Account for gap */
    }
}

.grid-item {
    position: relative;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.grid-item-number{
    font-size: 1.8rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: absolute;
    top:-10px;
}

.grid-item:not(.active) {
    background-image: url('images/door2_locked.webp');
}

.grid-item.unlocked {
    cursor: pointer;
    background-image: url('images/door2_closed.webp');
}

.grid-item.opened {
    cursor: pointer;
    background-image: url('images/door2_open.webp');
}

/* Special case for the 24th door */
.grid-item[data-item="24"]:not(.active) {
    background-image: url('images/door_locked.webp');
}

.grid-item.unlocked {
    cursor: pointer;
    background-image: url('images/door2_closed.webp');
}

/* Special case for the 24th door */
.grid-item[data-item="24"].unlocked {
    background-image: url('images/door_closed.webp');
}

.grid-item[data-item="1"].opened {
    background-image: url('images/door/door_open_1.webp');
}

.grid-item[data-item="2"].opened {
    background-image: url('images/door/door_open_2.webp');
}

.grid-item[data-item="3"].opened {
    background-image: url('images/door/door_open_3.webp');
}

.grid-item[data-item="4"].opened {
    background-image: url('images/door/door_open_4.webp');
}

.grid-item[data-item="5"].opened {
    background-image: url('images/door/door_open_5.webp');
}

.grid-item[data-item="6"].opened {
    background-image: url('images/door/door_open_6.webp');
}

.grid-item[data-item="7"].opened {
    background-image: url('images/door/door_open_7.webp');
}

.grid-item[data-item="8"].opened {
    background-image: url('images/door/door_open_8.webp');
}

.grid-item[data-item="9"].opened {
    background-image: url('images/door/door_open_9.webp');
}

.grid-item[data-item="10"].opened {
    background-image: url('images/door/door_open_10.webp');
}

.grid-item[data-item="11"].opened {
    background-image: url('images/door/door_open_11.webp');
}

.grid-item[data-item="12"].opened {
    background-image: url('images/door/door_open_12.webp');
}

.grid-item[data-item="13"].opened {
    background-image: url('images/door/door_open_13.webp');
}

.grid-item[data-item="14"].opened {
    background-image: url('images/door/door_open_14.webp');
}

.grid-item[data-item="15"].opened {
    background-image: url('images/door/door_open_15.webp');
}

.grid-item[data-item="16"].opened {
    background-image: url('images/door/door_open_16.webp');
}

.grid-item[data-item="17"].opened {
    background-image: url('images/door/door_open_17.webp');
}

.grid-item[data-item="18"].opened {
    background-image: url('images/door/door_open_18.webp');
}

.grid-item[data-item="19"].opened {
    background-image: url('images/door/door_open_19.webp');
}

.grid-item[data-item="20"].opened {
    background-image: url('images/door/door_open_20.webp');
}

.grid-item[data-item="21"].opened {
    background-image: url('images/door/door_open_21.webp');
}

.grid-item[data-item="22"].opened {
    background-image: url('images/door/door_open_22.webp');
}

.grid-item[data-item="23"].opened {
    background-image: url('images/door/door_open_23.webp');
}

.grid-item[data-item="24"].opened {
    background-image: url('images/door/door_open_24.webp');
}

/* Add these new rules */
.grid-item.locked {
    opacity: 1;
}

.grid-item.future {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.door-image-unlocked {
    width:100px;
    height:100px;
    background-image: url('images/door2_closed.webp');
    background-size: cover;
    background-position: center;
}

.door-image-open {
    width:100px;
    height:100px;
    background-image: url('images/door2_open.webp');
    background-size: cover;
    background-position: center;
}

.countdown {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 5px;
    border-radius: 3px;
    width:50%;
    text-align: center;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    padding: 30px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    min-height: 200px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #f8e4c6;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #d4b36a;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(212, 179, 106, 0.2);
    position: relative;
    background: linear-gradient(to bottom, rgba(43, 32, 14, 0.95) 0%, rgba(0, 0, 0, 0.95) 100%);
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-text {
    flex: 1;
    width: 100%;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
    padding: 0 20px;
    margin-bottom: 20px;
    font-family: "Bona Nova SC", serif;
    color: #f8e4c6;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Scrollbar styling */
.modal-text::-webkit-scrollbar {
    width: 8px;
}

.modal-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.modal-text::-webkit-scrollbar-thumb {
    background: rgba(212, 179, 106, 0.5);
    border-radius: 4px;
}

.modal-text::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 179, 106, 0.7);
}

#modal-buttons {
    width: 100%;
    padding: 10px 0px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(43, 32, 14, 0.7) 100%);
    position: sticky;
    bottom: 0;
    z-index: 2;
    border-top: 1px solid rgba(212, 179, 106, 0.3);
}

.modal-button {
    font-size: 1.2rem;
    cursor: pointer;
    background: linear-gradient(to bottom, #8b734b, #6b562c);
    color: #f8e4c6;
    border: 2px solid #d4b36a;
    border-radius: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 0 10px rgba(212, 179, 106, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
    font-family: "Bona Nova SC", serif;
    letter-spacing: 1px;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 180px;
    min-height: 54px;
    padding: 10px 30px;
    flex: 0 0 auto;
    max-width: 300px;
    vertical-align: top;
}

.modal-button:hover {
    background: linear-gradient(to bottom, #9c835a, #7c673d);
    border-color: #e5c47b;
    transform: translateY(-1px);
    box-shadow: 
        0 0 15px rgba(212, 179, 106, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
}

.modal-button:active {
    transform: translateY(1px);
    background: linear-gradient(to bottom, #6b562c, #8b734b);
    box-shadow: 
        0 0 5px rgba(212, 179, 106, 0.2),
        inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Add decorative corners to modal */
.modal-content::before,
.modal-content::after {
    content: '✧';
    position: absolute;
    color: #d4b36a;
    font-size: 1.2rem;
    opacity: 0.6;
}

.modal-content::before {
    left: 10px;
    top: 10px;
}

.modal-content::after {
    right: 10px;
    bottom: 10px;
}

/* Media query for better mobile display */
@media (max-height: 600px) {
    .modal-content {
        margin: 20px auto;
        max-height: 90vh;
    }
    
    .modal-text {
        max-height: calc(90vh - 100px);
    }

    
}

.loading {
    text-align: center;
    font-size: 1.2rem;
    color: white;
    padding: 20px;
}

#modal-text-container {
    position: relative;
    font-size: 1.2rem;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    
    /* For Webkit browsers like Chrome/Safari */
    &::-webkit-scrollbar {
        width: 8px;
    }
    
    &::-webkit-scrollbar-track {
        background: transparent;
    }
    
    &::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.3);
        border-radius: 4px;
    }
}

#modal-text {
    /* position: absolute; */
    top: 0;
    left: 0;
    width: 100%;
    /* height: 100%; */
    margin-bottom:20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#modal-text.fade-out {
    opacity: 0;
}

#modal-buttons {
    transition: opacity 0.3s ease;
}

#modal-buttons.fade-out {
    opacity: 0;
}

.site-footer {
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.9) 0%,
        rgba(43, 32, 14, 0.9) 100%);
    color: #f8e4c6;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
    border-top: 2px solid #d4b36a;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    margin: 5px 0;
    font-size: 0.9rem;
    font-family: "Bona Nova SC", serif;
    color: #d4b36a;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .footer-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    h1 {
        font-size: 3rem;
    }
}

.site-footer {
    flex-shrink: 0;
}

.prociono-regular {
    font-family: "Prociono", serif;
    font-weight: 600;
    font-style: normal;
}

.bona-nova-sc-regular {
    font-family: "Bona Nova SC", serif;
    font-weight: 400;
    font-style: normal;
}

.bona-nova-sc-bold {
    font-family: "Bona Nova SC", serif;
    font-weight: 700;
    font-style: normal;
}

.bona-nova-sc-regular-italic {
    font-family: "Bona Nova SC", serif;
    font-weight: 400;
    font-style: italic;
}
  

.legend {
    background: linear-gradient(to bottom,
        rgba(43, 32, 14, 0.95) 0%,
        rgba(0, 0, 0, 0.95) 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 20px auto;
    width: 80%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    border: 2px solid #d4b36a;
    box-shadow: 
        0 0 15px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(212, 179, 106, 0.2);
}

.legend-item {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 15px;
    color: #f8e4c6;
    width: 200px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 179, 106, 0.3);
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(212, 179, 106, 0.2);
}

.legend-image {
    width: 50px;
    height: 50px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    border: 1px solid #d4b36a;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.legend-text {
    font-family: "Bona Nova SC", serif;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    color: #d4b36a;
}

@media (min-width: 768px) {
    .legend {
        flex-direction: row;
        justify-content: center;
        gap: 40px;
        padding: 25px;
    }
    
    .legend-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: auto;
        padding: 15px;
    }

    .legend-text {
        text-align: center;
        margin-top: 10px;
    }
}

/* Update legend images for consistency */
.legend-item:nth-child(1) .legend-image {
    background-image: url('images/door2_locked.webp');
}

.legend-item:nth-child(2) .legend-image {
    background-image: url('images/door2_closed.webp');
}

.legend-item:nth-child(3) .legend-image {
    background-image: url('images/door2_open.webp');
}

/* Add decorative corners to legend */
.legend::before,
.legend::after {
    content: '✧';
    position: absolute;
    color: #d4b36a;
    font-size: 1.2rem;
    opacity: 0.6;
}

.legend::before {
    left: 10px;
    top: 10px;
}

.legend::after {
    right: 10px;
    bottom: 10px;
}

/* Add these new styles */
.scroll-indicator {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-right: 3px solid #d4b36a;
    border-bottom: 3px solid #d4b36a;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(-10px);
    }
    60% {
        transform: rotate(45deg) translateY(-5px);
    }
}

/* Update modal-text-container */
#modal-text-container {
    position: relative;
    font-size: 1.2rem;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    
    /* For Webkit browsers like Chrome/Safari */
    &::-webkit-scrollbar {
        width: 8px;
    }
    
    &::-webkit-scrollbar-track {
        background: transparent;
    }
    
    &::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.3);
        border-radius: 4px;
    }
}

/* Add decorative elements */
header::before,
header::after,
.site-footer::before,
.site-footer::after {
    content: '✧';
    color: #d4b36a;
    font-size: 1.5rem;
    position: absolute;
    opacity: 0.6;
}

header::before {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

header::after {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.site-footer::before {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.site-footer::after {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Hover effects for unlocked/opened doors */
.grid-item.unlocked:hover,
.grid-item.opened:hover {
    /* transform: translateY(-2px); */
    cursor: pointer;
    filter: 
        drop-shadow(1px 0 0 rgba(212, 179, 106, 0.9))
        drop-shadow(-1px 0 0 rgba(212, 179, 106, 0.9))
        drop-shadow(0 1px 0 rgba(212, 179, 106, 0.9))
        drop-shadow(0 -1px 0 rgba(212, 179, 106, 0.9));
}

/* Active state when clicking */
.grid-item.unlocked:active,
.grid-item.opened:active {
    transform: translateY(1px);
    filter: 
        drop-shadow(1px 0 0 rgba(212, 179, 106, 0.7))
        drop-shadow(-1px 0 0 rgba(212, 179, 106, 0.7))
        drop-shadow(0 1px 0 rgba(212, 179, 106, 0.7))
        drop-shadow(0 -1px 0 rgba(212, 179, 106, 0.7));
}

.grid-item-number {
    font-size: 1.8rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: "Bona Nova SC", serif;
    transition: transform 0.3s ease;
}

/* Optional: keep the number animation */
.grid-item.unlocked:hover .grid-item-number,
.grid-item.opened:hover .grid-item-number {
    transform: scale(1.1);
}

.selected-choice {
    margin: 25px auto;
    padding: 15px;
    font-size: 1.3rem;
    background: linear-gradient(to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(212, 179, 106, 0.1) 20%,
        rgba(212, 179, 106, 0.1) 80%,
        rgba(0, 0, 0, 0) 100%);
    color: #d4b36a;
    font-family: "Bona Nova SC", serif;
    text-shadow: 
        0 0 10px rgba(212, 179, 106, 0.5),
        1px 1px 2px rgba(0, 0, 0, 0.8);
    position: relative;
    text-align: center;
    letter-spacing: 1px;
}

.selected-choice::before,
.selected-choice::after {
    content: '✧';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #d4b36a;
    font-size: 1rem;
    opacity: 0.6;
}

.selected-choice::before {
    left: 20px;
}

.selected-choice::after {
    right: 20px;
}

.reset-container {
    /* margin: 20px auto; */
    text-align: center;
    padding: 20px 20px;
    border-top: 1px solid rgba(212, 179, 106, 0.3);
}

.reset-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    background: linear-gradient(to bottom, #8b734b, #6b562c);
    color: #f8e4c6;
    border: 2px solid #d4b36a;
    border-radius: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 0 10px rgba(212, 179, 106, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
    font-family: "Bona Nova SC", serif;
    letter-spacing: 1px;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    min-width: 220px;
}

.reset-button:hover {
    background: linear-gradient(to bottom, #9c835a, #7c673d);
    border-color: #e5c47b;
    transform: translateY(-1px);
    box-shadow: 
        0 0 15px rgba(212, 179, 106, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
}

.reset-button:active {
    transform: translateY(1px);
    background: linear-gradient(to bottom, #6b562c, #8b734b);
    box-shadow: 
        0 0 5px rgba(212, 179, 106, 0.2),
        inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Loading animation container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #d4b36a;
}

/* Magical loading animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    position: relative;
    margin-bottom: 20px;
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top-color: #d4b36a;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.loading-spinner::before {
    border-top-color: #d4b36a;
    animation-duration: 1.5s;
}

.loading-spinner::after {
    border-right-color: #d4b36a;
    animation-duration: 3s;
}

.loading-text {
    font-family: "Bona Nova SC", serif;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(212, 179, 106, 0.5);
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.legend-container {
    width: 90%;
    max-width: 600px;
    margin: 5px auto;
}

.legend-header {
    background: linear-gradient(to bottom,
        rgba(43, 32, 14, 0.95) 0%,
        rgba(0, 0, 0, 0.95) 100%);
    padding: 15px 20px;
    border: 2px solid #d4b36a;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease, border-radius 0.3s ease;
}

.legend-header:hover {
    box-shadow: 0 0 15px rgba(212, 179, 106, 0.2);
}

.legend-title {
    color: #d4b36a;
    font-family: "Bona Nova SC", serif;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.legend-arrow {
    color: #d4b36a;
    transition: transform 0.3s ease;
}

.legend-content {
    background: linear-gradient(to bottom,
        rgba(43, 32, 14, 0.95) 0%,
        rgba(0, 0, 0, 0.95) 100%);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1),
                border 0.3s ease;
    border-left: 0px solid #d4b36a;
    border-right: 0px solid #d4b36a;
    border-bottom: 0px solid #d4b36a;
    border-radius: 0 0 8px 8px;
    margin-top: -2px;
}

.legend-content.expanded {
    max-height: 1000px;
    transition: max-height 1s ease-in-out;
    border-left: 2px solid #d4b36a;
    border-right: 2px solid #d4b36a;
    border-bottom: 2px solid #d4b36a;
}

.instructions {
    color: #f8e4c6;
    font-family: "Bona Nova SC", serif;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(212, 179, 106, 0.3);
    line-height: 1.6;
    font-size: 1.2rem;
}

.legend-items {
    display: flex;
    /* flex-direction: column; */
    gap: 15px;
    padding: 20px;
    align-items: center;
}

/* Update existing legend item styles */
.legend-item {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 179, 106, 0.3);
    border-radius: 4px;
    transition: transform 0.2s ease;
}

/* Rest of your existing legend styles... */

.footer {
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(43, 32, 14, 0.95) 100%);
    padding: 20px;
    text-align: center;
    color: #d4b36a;
    font-family: "Bona Nova SC", serif;
    border-top: 2px solid #d4b36a;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    margin: 0;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    .minigame-iframe {
        height: 300px;
    }
    .legend-items {
        flex-direction: column;
    }
    .footer-content {
        flex-direction: column;
        gap: 0px;
    }
    
    .footer-text {
        margin: 5px 0;
    }
    
    .footer-link-separator{
        display: none;
    }
}

/* Learn More Section */
.learn-more-container {
    width: 90%;
    max-width: 600px;
    margin: 5px auto;
}

.learn-more-header {
    background: linear-gradient(to bottom,
        rgba(43, 32, 14, 0.95) 0%,
        rgba(0, 0, 0, 0.95) 100%);
    padding: 15px 20px;
    border: 2px solid #d4b36a;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease, border-radius 0.3s ease;
}

.learn-more-header:hover {
    box-shadow: 0 0 15px rgba(212, 179, 106, 0.2);
}

.learn-more-title {
    color: #d4b36a;
    font-family: "Bona Nova SC", serif;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.learn-more-arrow {
    color: #d4b36a;
    transition: transform 0.3s ease;
}

.learn-more-content {
    background: linear-gradient(to bottom,
        rgba(43, 32, 14, 0.95) 0%,
        rgba(0, 0, 0, 0.95) 100%);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1),
                border 0.3s ease;
    border-left: 0px solid #d4b36a;
    border-right: 0px solid #d4b36a;
    border-bottom: 0px solid #d4b36a;
    border-radius: 0 0 8px 8px;
    margin-top: -2px;
}

.learn-more-content.expanded {
    max-height: 1000px;
    transition: max-height 1s ease-in-out;
    border-left: 2px solid #d4b36a;
    border-right: 2px solid #d4b36a;
    border-bottom: 2px solid #d4b36a;
}

.learn-more-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    align-items: center;
}

.learn-more-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    background: linear-gradient(to bottom, #8b734b, #6b562c);
    color: #f8e4c6;
    border: 2px solid #d4b36a;
    border-radius: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 0 10px rgba(212, 179, 106, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
    font-family: "Bona Nova SC", serif;
    letter-spacing: 1px;
    min-width: 220px;
}

.learn-more-button:hover {
    background: linear-gradient(to bottom, #9c835a, #7c673d);
    border-color: #e5c47b;
    transform: translateY(-1px);
    box-shadow: 
        0 0 15px rgba(212, 179, 106, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
}

.learn-more-button:active {
    transform: translateY(1px);
    background: linear-gradient(to bottom, #6b562c, #8b734b);
    box-shadow: 
        0 0 5px rgba(212, 179, 106, 0.2),
        inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Add these to your existing learn-more styles */
.about-intro {
    padding: 20px 20px 10px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(212, 179, 106, 0.3);
    margin-bottom: 10px;
}

.about-intro p {
    color: #f8e4c6;
    font-family: "Bona Nova SC", serif;
    line-height: 1.8;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.learn-more-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.learn-more-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.learn-more-description {
    color: #f8e4c6;
    font-family: "Bona Nova SC", serif;
    line-height: 1.6;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 500px;
}

/* Legend styles */
.legend-content.expanded + .legend-header,
.legend-header.expanded {
    border-radius: 8px 8px 0 0;
}

/* Learn More styles */
.learn-more-content.expanded + .learn-more-header,
.learn-more-header.expanded {
    border-radius: 8px 8px 0 0;
}

/* Media queries for mobile devices */
@media (max-width: 768px) {
    .modal-button,
    .learn-more-button,
    .reset-button {
        font-size: 1rem;
        padding: 12px 24px;
        min-width: 180px;
    }

    .modal-text {
        font-size: 1rem;
    }

    .selected-choice {
        font-size: 1.1rem;
        margin: 20px auto;
    }
}

/* Reset Prompt Modal */
.reset-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.reset-prompt {
    background: linear-gradient(to bottom,
        rgba(43, 32, 14, 0.98) 0%,
        rgba(0, 0, 0, 0.98) 100%);
    padding: 30px;
    border: 2px solid #d4b36a;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(212, 179, 106, 0.2);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.reset-prompt.show {
    transform: scale(1);
    opacity: 1;
}

.reset-prompt-title {
    color: #d4b36a;
    font-family: "Bona Nova SC", serif;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.reset-prompt-message {
    color: #f8e4c6;
    font-family: "Bona Nova SC", serif;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.reset-prompt-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.reset-prompt-button {
    padding: 12px 24px;
    font-size: 1.1rem;
    cursor: pointer;
    background: linear-gradient(to bottom, #8b734b, #6b562c);
    color: #f8e4c6;
    border: 2px solid #d4b36a;
    border-radius: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: "Bona Nova SC", serif;
    letter-spacing: 1px;
    transition: all 0.2s ease-in-out;
    min-width: 120px;
}

.reset-prompt-button:hover {
    background: linear-gradient(to bottom, #9c835a, #7c673d);
    border-color: #e5c47b;
    transform: translateY(-1px);
}

.reset-prompt-button.cancel {
    background: linear-gradient(to bottom, #4a4a4a, #2a2a2a);
}

.reset-prompt-button.cancel:hover {
    background: linear-gradient(to bottom, #5a5a5a, #3a3a3a);
}

.audio-player {
    background: linear-gradient(to bottom, 
        rgba(43, 32, 14, 0.95) 0%,
        rgba(0, 0, 0, 0.95) 100%);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #d4b36a;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.play-button {
    background: linear-gradient(to bottom, #8b734b, #6b562c);
    border: 2px solid #d4b36a;
    color: #f8e4c6;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 10px rgba(212, 179, 106, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
}

.play-button:hover {
    background: linear-gradient(to bottom, #9c835a, #7c673d);
    transform: scale(1.05);
    border-color: #e5c47b;
    box-shadow: 
        0 0 15px rgba(212, 179, 106, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
}

.play-button:active {
    transform: scale(0.95);
    background: linear-gradient(to bottom, #6b562c, #8b734b);
    box-shadow: 
        0 0 5px rgba(212, 179, 106, 0.2),
        inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.play-button i {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    line-height: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.play-button i.bi-play-fill {
    margin-left: 3px;
}

.progress-bar {
    flex-grow: 1;
    height: 8px;
    background: rgba(212, 179, 106, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212, 179, 106, 0.3);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #d4b36a, #e5c47b);
    border-radius: 4px;
    width: 0;
    transition: width 0.1s linear;
    box-shadow: 0 0 5px rgba(212, 179, 106, 0.4);
}

.time {
    font-size: 14px;
    color: #f8e4c6;
    min-width: 55px;
    text-align: right;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: "Bona Nova SC", serif;
}

.audio-player::before {
    content: "🎧 Listen to the Story";
    display: block;
    color: #d4b36a;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: "Bona Nova SC", serif;
    letter-spacing: 1px;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.progress-bar:hover .progress {
    animation: pulse 2s infinite;
}

/* Add hover effect for the progress bar */
.progress-bar:hover {
    background: rgba(212, 179, 106, 0.3);
}

/* Add transition for smoother hover effects */
.progress-bar, .progress {
    transition: all 0.3s ease;
}

.about-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #8b6c42;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.discord-link:hover {
    color: #d4a373;
    text-decoration: none;
    opacity: 1;
}

.discord-link i {
    font-size: 1.1em;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .about-links {
        flex-wrap: wrap;
    }
    
    .about-links a:first-child::after {
        display: none;
    }
}

.kick-door {
    background-color: #8b0000 !important;
    position: relative;
}

.kick-door:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.kick-door:not(:disabled):hover {
    background-color: #a00000 !important;
}

.kick-text {
    display: none;
}

.kick-countdown {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2em;
    font-weight: bold;
}

.kick-door:not(:disabled) .kick-text {
    display: block;
}

.footer-link{
    color: #d4b36a;
    text-decoration: none;
    transition: text-shadow 0.3s ease;
    text-shadow: 0 0 10px rgba(212, 179, 106, 0.5);
}

.footer-link:hover{
    text-shadow: 0 0 10px rgba(212, 179, 106, 0.5);
}

.footer-link-separator{
    color: #d4b36a;
    text-decoration: none;
    transition: text-shadow 0.3s ease;
    text-shadow: 0 0 10px rgba(212, 179, 106, 0.5);
}