body, html {
    margin: 0; padding: 0;
    width: 100%; min-height: 100vh;
    background: #fdf5e6;
    overflow-x: hidden; 
    overflow-y: auto;
    font-family: 'Times New Roman', serif;
    -webkit-tap-highlight-color: transparent;
}

#background-layer {
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100vh;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 1; 
    pointer-events: none;
    box-sizing: border-box;
    padding: 2vh;
}

#background-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('background.jpg'); 
    background-size: cover;
    background-position: center;
    opacity: 0.2; 
    z-index: -1;
}

#hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-height: 95vh;
}

.tribute-header, .tribute-subheader {
    margin: 0;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    color: #4a4a4a;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-weight: normal;
}

.tribute-header { font-size: 6vh; margin-bottom: 0.5vh; }
.tribute-subheader { font-size: 3vh; margin-bottom: 2vh; letter-spacing: 2px; }

#hero-image {
    height: 40vh; 
    width: auto;
    border-radius: 50%;
    border: 1vh solid white; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

#tribute-text {
    margin-top: 2vh;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    font-size: 4vh;
    color: #4a4a4a;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 1px;
}

#card-container { 
    position: relative; 
    width: 100%; 
    max-width: none; 
    margin: 0;
    z-index: 2; 
    padding-top: 20vh;
    padding-bottom: 300px;
}

.card-thumb {
    position: absolute; 
    width: 210px; 
    cursor: pointer;
    border: 4px solid white; 
    background: white;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.8s ease, top 0.8s ease, left 0.8s ease;
    z-index: 10;
}

.card-thumb:hover {
    z-index: 100;
    transform: scale(1.05) !important;
}

#modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    cursor: pointer;
    pointer-events: auto; /* Ensure it captures touches */
}

.hidden { display: none !important; }

#modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modal-img {
    max-width: 85vw; max-height: 85vh;
    border: 10px solid white;
    pointer-events: none; 
}

.nav-control {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 70px; height: 70px;
    background: rgba(255, 255, 255, 0.2);
    color: white; border: 2px solid white;
    font-size: 3rem; border-radius: 50%;
    cursor: pointer; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    user-select: none;
}

#prev-btn { left: 30px; }
#next-btn { right: 30px; }

#close-hint { position: absolute; bottom: 20px; color: white; opacity: 0.5; font-size: 0.8rem; }