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

body {
    font-family: Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    min-height: 100vh;
    position: relative;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.home-link {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    z-index: 100;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
}

.home-link:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.gallery-link {
    position: fixed;
    top: 20px;
    right: 80px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    z-index: 100;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
}

.gallery-link:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.card-link {
    position: fixed;
    top: 20px;
    right: 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    z-index: 100;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
}

.card-link:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

#birthday-text {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 50px;
    text-align: center;
}

.rolodex-wrapper {
    width: 100%;
    max-width: 800px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.rolodex-container {
    position: relative;
    width: 700px;
    height: 500px;
}

.rolodex-card {
    position: absolute;
    width: 100px;
    height: 100px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    animation: smoothFloat 12s ease-in-out infinite;
}

.rolodex-card:hover {
    transform: scale(1.15);
    z-index: 100;
}

.rolodex-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-radius: 50%;
}

@keyframes smoothFloat {
    0% {
        transform: translate(-50%, -50%) translateY(0px) translateX(0px) rotate(0deg);
    }
    20% {
        transform: translate(-50%, -50%) translateY(-15px) translateX(8px) rotate(2deg);
    }
    40% {
        transform: translate(-50%, -50%) translateY(-8px) translateX(-10px) rotate(-1deg);
    }
    60% {
        transform: translate(-50%, -50%) translateY(12px) translateX(-6px) rotate(1deg);
    }
    80% {
        transform: translate(-50%, -50%) translateY(15px) translateX(7px) rotate(-2deg);
    }
    100% {
        transform: translate(-50%, -50%) translateY(0px) translateX(0px) rotate(0deg);
    }
}

/* Full circular arrangement - 10 cards evenly distributed around a circle */
.rolodex-card:nth-child(1) {
    left: 50%; top: 10%;
    transform: translate(-50%, -50%);
    animation-delay: 0s;
}
.rolodex-card:nth-child(2) {
    left: 74%; top: 17%;
    transform: translate(-50%, -50%);
    animation-delay: 0.5s;
}
.rolodex-card:nth-child(3) {
    left: 88%; top: 38%;
    transform: translate(-50%, -50%);
    animation-delay: 1s;
}
.rolodex-card:nth-child(4) {
    left: 88%; top: 62%;
    transform: translate(-50%, -50%);
    animation-delay: 1.5s;
}
.rolodex-card:nth-child(5) {
    left: 74%; top: 83%;
    transform: translate(-50%, -50%);
    animation-delay: 2s;
}
.rolodex-card:nth-child(6) {
    left: 50%; top: 90%;
    transform: translate(-50%, -50%);
    animation-delay: 2.5s;
}
.rolodex-card:nth-child(7) {
    left: 26%; top: 83%;
    transform: translate(-50%, -50%);
    animation-delay: 3s;
}
.rolodex-card:nth-child(8) {
    left: 12%; top: 62%;
    transform: translate(-50%, -50%);
    animation-delay: 3.5s;
}
.rolodex-card:nth-child(9) {
    left: 12%; top: 38%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}
.rolodex-card:nth-child(10) {
    left: 26%; top: 17%;
    transform: translate(-50%, -50%);
    animation-delay: 4.5s;
}

.nav-controls {
    display: none;
}

/* Detail page styles */
.detail-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 20px 40px;
}

.detail-page .home-link,
.detail-page .gallery-link,
.detail-page .card-link,
.gallery-page .home-link,
.gallery-page .gallery-link,
.gallery-page .card-link,
.circles-page .home-link,
.circles-page .gallery-link,
.circles-page .card-link {
    color: #ff0000;
    background-color: transparent;
    padding: 0;
}

.detail-page .home-link:hover,
.detail-page .gallery-link:hover,
.detail-page .card-link:hover,
.gallery-page .home-link:hover,
.gallery-page .gallery-link:hover,
.gallery-page .card-link:hover,
.circles-page .home-link:hover,
.circles-page .gallery-link:hover,
.circles-page .card-link:hover {
    background-color: transparent;
    opacity: 0.7;
}

.back-button {
    background: none;
    border: none;
    color: #000000;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
    transition: opacity 0.3s ease;
}

.back-button:hover {
    opacity: 0.7;
}

.detail-image {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 30px;
}

.detail-text {
    max-width: 500px;
    line-height: 1.6;
    color: #000000;
    font-size: 14px;
    text-align: center;
}

/* Card page styles */
.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 20px 40px;
}

.card-page .home-link,
.card-page .gallery-link,
.card-page .card-link {
    color: #ff0000;
    background-color: transparent;
    padding: 0;
}

.card-page .home-link:hover,
.card-page .gallery-link:hover,
.card-page .card-link:hover {
    background-color: transparent;
    opacity: 0.7;
}

.card-image {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 30px;
}

.card-message {
    max-width: 500px;
    text-align: center;
    line-height: 1.6;
    font-size: 16px;
}

.card-message p {
    margin-bottom: 20px;
}

/* Infinite Gallery Styles */
.infinite-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(10, 30vw);
    grid-auto-rows: 30vw;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
}

.infinite-gallery::-webkit-scrollbar {
    display: none;
}

.infinite-gallery {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gallery-cell {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-cell img:hover {
    transform: scale(1.05);
}

/* Lock icons for hidden presents */
.lock-icon {
    position: fixed;
    font-size: 18px;
    cursor: pointer;
    z-index: 150;
    transition: transform 0.3s ease;
}

.lock-icon:hover {
    transform: scale(1.2);
}

.lock-1 {
    top: 45%;
    left: 15%;
}

.lock-2 {
    top: 70%;
    right: 22%;
}

.lock-3 {
    top: 35%;
    right: 18%;
}

.lock-4 {
    top: 58%;
    left: 25%;
}

.lock-5 {
    top: 28%;
    left: 42%;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.close,
.close-unlock {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: normal;
    cursor: pointer;
    color: #000000;
}

.close:hover,
.close-unlock:hover {
    opacity: 0.7;
}

.modal-content h2 {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 30px;
    line-height: 1.5;
}

#quizOptions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.quiz-option {
    background-color: transparent;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 16px;
    font-family: Helvetica, Arial, sans-serif;
    transition: all 0.2s ease;
    text-align: left;
}

.quiz-option:hover {
    opacity: 0.7;
}

.quiz-option.correct {
    color: #008000;
}

.quiz-option.incorrect {
    color: #FF0000;
}

#quizResult {
    font-size: 16px;
    margin-top: 20px;
    min-height: 24px;
}

#unlockMessage {
    font-size: 18px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .rolodex-wrapper {
        height: 400px;
        max-width: 100%;
    }

    .rolodex-container {
        width: 100%;
        height: 350px;
        max-width: 350px;
    }

    .rolodex-card {
        width: 70px;
        height: 70px;
    }

    #birthday-text {
        font-size: 20px;
        margin-bottom: 30px;
    }

    .detail-image {
        max-width: 100%;
    }

    .card-message {
        max-width: 100%;
        font-size: 14px;
    }
}
