@font-face {
    font-family: 'GT America';
    src: url('Fonts/GT America Fonts/GT-America-Standard-Regular-Trial.otf') format('opentype');
    font-weight: normal; /* Maps to 400 */
    font-style: normal;
}

@font-face {
    font-family: 'GT America';
    src: url('Fonts/GT America Fonts/GT-America-Standard-Light-Trial.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

/* Map bold requests to normal to prevent synthesised bolding */
@font-face {
    font-family: 'GT America';
    src: url('Fonts/GT America Fonts/GT-America-Standard-Regular-Trial.otf') format('opentype');
    font-weight: bold; /* Maps to 700 */
    font-style: normal;
}

/* ===== VARIABLES & BASE ===== */
:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --red-accent: #a31d1d; /* Deep historical red */
    --hover-color: #e63946;
}

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

body {
    font-family: 'GT America', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden; /* Prevent scrolling for SPA */
    width: 100vw;
    height: 100vh;
}

/* Global Nav Button */
.back-to-sa {
    position: fixed;
    top: 2rem;
    right: 2rem;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 300 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 100;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.back-to-sa:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* ===== ROUTING VIEWS ===== */
.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
}

.view.active {
    opacity: 1;
    pointer-events: all;
    z-index: 10;
}

/* ===== START PAGE ===== */
#start-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden !important;
}

.bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background-color: var(--bg-color);
}

.color-dance-blob {
    position: absolute;
    width: 80vmax;
    height: 80vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
}

.red-blob {
    background: radial-gradient(circle, var(--red-accent) 0%, transparent 70%);
    top: -20%;
    left: -20%;
    animation: dance-red 25s infinite alternate ease-in-out;
}

.blue-blob {
    background: radial-gradient(circle, #1e4b9e 0%, transparent 70%);
    bottom: -20%;
    right: -20%;
    animation: dance-blue 30s infinite alternate-reverse ease-in-out;
}

.white-blob {
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    top: 30%;
    left: 30%;
    width: 60vmax;
    height: 60vmax;
    animation: dance-white 35s infinite alternate ease-in-out;
}

@keyframes dance-red {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15vw, 10vh) scale(1.1); }
    100% { transform: translate(-5vw, 20vh) scale(0.95); }
}

@keyframes dance-blue {
    0% { transform: translate(0, 0) scale(1.1); }
    50% { transform: translate(-20vw, -10vh) scale(0.9); }
    100% { transform: translate(10vw, -25vh) scale(1.05); }
}

@keyframes dance-white {
    0% { transform: translate(0, 0); }
    50% { transform: translate(5vw, -5vh); }
    100% { transform: translate(-10vw, 10vh); }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
    pointer-events: none;
}

.title-container {
    border: 8px solid var(--red-accent);
    padding: 0;
    width: clamp(280px, 40vw, 500px);
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.2);
    z-index: 5;
    position: relative;
    overflow: hidden;
}

.landing-logo {
    width: 85%;
    height: auto;
    object-fit: contain;
}

/* Remove hover jump as requested */

/* Title text styles removed for image logo */

.enter-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 300 !important;
    text-transform: uppercase;
    color: var(--text-color);
    background: transparent;
    border: 2px solid var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
    letter-spacing: 0.1em;
}

.secondary-btn {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
}

.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2.5rem;
    width: clamp(280px, 40vw, 500px);
    z-index: 10;
}

.landing-actions .enter-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin-top: 0;
}

@media (max-width: 768px) {
    .landing-actions {
        width: 80vw;
    }
}

.enter-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.copyright-footer {
    position: absolute;
    bottom: 2rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.05em;
    user-select: none;
    z-index: 5;
}

/* ===== MAIN MENU ===== */
#main-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
}

.close-menu-btn {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 300 !important;
    text-transform: uppercase;
    z-index: 50;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.close-menu-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.menu-link {
    font-size: 3rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 300 !important;
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.3s ease;
}

.menu-link:hover {
    color: var(--red-accent);
}

/* ===== GALLERY & PORTRAIT GRID ===== */
.gallery-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    overflow-x: auto;
    overflow-y: hidden;
    gap: 15vw;
    padding: 6rem 10vw 4rem 10vw; /* Increased vertical padding for more breathing space */
    scroll-snap-type: x mandatory;
}

.gallery-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for a cleaner design */
}

.portrait-grid {
    width: 70vmin; /* Reduced further from 75vmin for better breathing space */
    height: 70vmin;
    flex-shrink: 0;
    scroll-snap-align: center;
    display: grid;
    grid-template-columns: repeat(25, 1fr);
    grid-template-rows: repeat(25, 1fr);
    gap: 1px;
    background-color: transparent;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border: 2px solid var(--bg-color);
    position: relative;
}

.grid-piece {
    background-color: #333; /* Lightened from #1a1a1a for better visibility */
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.grid-piece:hover {
    background-color: var(--red-accent);
}

.corner-cell {
    position: relative;
    background-color: transparent;
}

.triangle-piece {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #333; /* Lightened from #1a1a1a for better visibility */
    cursor: pointer;
    transition: background-color 0.2s;
}

.triangle-piece:hover {
    background-color: var(--red-accent);
    z-index: 2; /* Pop over the other triangle visually */
}

/* Center portrait image and overlay */
.center-content {
    grid-column: 2 / 25;
    grid-row: 2 / 25;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

.main-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to prevent stretch/crop feeling */
    opacity: 0.8;
    transition: opacity 0.5s, filter 0.5s;
    background: #000;
}

.main-portrait-img.blurred {
    filter: blur(8px) brightness(0.4);
}

.comic-illustration-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 10;
    pointer-events: none;
    color: var(--text-color);
}

.comic-illustration-info.show {
    opacity: 1;
}

.comic-year-label {
    font-size: 1.2rem;
    color: var(--red-accent);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.comic-text-info {
    font-size: 1.4rem;
    line-height: 1.4;
}

/* Overlay that appears on click */
.info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    padding: 3rem 2rem 1.5rem 2rem;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-top: 2px solid var(--red-accent);
}

.info-overlay.show {
    transform: translateY(0);
    opacity: 1;
}

.info-overlay h3 {
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--red-accent);
}

.info-overlay p {
    font-size: 1.2rem;
    line-height: 1.5;
    color: #ccc;
}

.back-abs {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 300 !important;
    text-transform: uppercase;
    z-index: 50;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.back-abs:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* ===== JOURNALS: AMERICAN CHRONICLE ===== */
.chronicle-container {
    padding: 6rem 2rem 2rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color);
}

.chronicle-container h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.periodic-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr); /* Exactly 10 years per line */
    gap: 4px;
    width: 90vw;
    max-width: 1000px;
    height: auto;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 10px;
}

.chronicle-year {
    background-color: #1a1a1a;
    border: 1px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    color: #888;
}

.chronicle-year:hover, .chronicle-year.active {
    background-color: var(--text-color);
    color: var(--bg-color);
    transform: scale(1.15);
    z-index: 5;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    border-color: white;
}

/* Visual symbols */
.symbol-war { 
    border-bottom: 3px solid var(--red-accent); 
    color: #ccc;
}
.symbol-president { 
    border-top: 3px solid #4a90e2; 
}
.symbol-birth { 
    background: radial-gradient(circle at center, #3a2a2a 0%, #1a1a1a 100%); 
}

/* ===== CHRONICLE POPUP WINDOW ===== */
.chronicle-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none; /* Toggled via JS */
    justify-content: center;
    align-items: center;
}

.chronicle-popup.active {
    display: flex;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.popup-content {
    position: relative;
    background: #111;
    border: 2px solid var(--red-accent);
    width: 90vw;
    max-width: 800px;
    padding: 3rem;
    z-index: 10;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #888;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.popup-close:hover {
    color: white;
}

.popup-nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.nav-mid-row {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    gap: 2rem;
}

.nav-arrow {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-color);
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-arrow:hover {
    background: var(--red-accent);
    border-color: var(--red-accent);
    color: white;
}

.nav-arrow:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    background: transparent !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: #444 !important;
}

.popup-body {
    flex-grow: 1;
    text-align: center;
}

#popup-year-title {
    color: var(--red-accent);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

.popup-info-text {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #ddd;
    min-height: 150px;
}

/* ===== GAMES SECTION ===== */
.games-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Better for scrolling content */
    min-height: 100%;
    padding: 100px 2rem 50px 2rem;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--red-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 80%;
    max-width: 800px;
}

.game-card {
    background: rgba(255,255,255,0.05);
    padding: 2.5rem;
    border-left: 4px solid var(--text-color);
    text-align: left;
    transition: transform 0.3s ease, background 0.3s ease;
    cursor: default;
}

.game-card:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--red-accent);
}

.game-card h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.game-card p {
    color: #ccc;
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.game-actions {
    display: flex;
    gap: 1.5rem;
}

.game-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-color);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: none; /* Written regularly, not all caps */
    letter-spacing: 0.05em;
}

.game-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* ===== FILMS SECTION ===== */
.cinema-container {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    background-color: #000;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10vw;
    padding: 0 10vw;
    scroll-snap-type: x mandatory;
}

.cinema-container::-webkit-scrollbar {
    display: none;
}

.cinema-screen {
    flex: 0 0 90vw;
    height: 60vh;
    aspect-ratio: 21 / 9;
    background-color: #080808;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 80px rgba(255, 255, 255, 0.08);
    border: 3px solid #333;
    position: relative;
    scroll-snap-align: center;
    overflow: hidden;
}

.screen-glow {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.cinema-screen h2 {
    color: var(--text-color);
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: none; /* Written regularly */
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
    z-index: 2;
    padding: 2rem;
    text-align: center;
}

/* ===== MUSIC SECTION ===== */
.audio-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    max-width: 1000px;
    margin: 3rem auto;
}

.audio-track-card {
    background: rgba(40,40,40,0.5);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid var(--red-accent);
    width: clamp(300px, 45%, 450px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s;
}

.audio-track-card:hover {
    transform: translateY(-5px);
    background: rgba(60,60,60,0.8);
}

.audio-title {
    font-size: 1.4rem;
    color: var(--text-color);
}

.custom-audio {
    width: 100%;
    outline: none;
    border-radius: 4px;
}

/* ===== BOOKSTORE / LIBRARIES ===== */
.library-container {
    padding: 6rem 2rem 5rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color);
    overflow-y: auto;
}

.library-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red-accent);
}

.library-subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bookstore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 3rem;
    width: 90vw;
    max-width: 1200px;
}

/* 3D Book Cover styling */
.book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #111;
    position: relative;
    border-radius: 2px 6px 6px 2px;
    box-shadow: 
        inset 4px 0 10px rgba(0, 0, 0, 0.5),
        inset -1px 0 2px rgba(255, 255, 255, 0.3),
        5px 5px 15px rgba(0, 0, 0, 0.8),
        15px 15px 35px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem 1rem;
    overflow: hidden;
    cursor: pointer;
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8px; /* Spine crease */
    bottom: 0;
    width: 3px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 1px 0 2px rgba(0,0,0,0.5);
    z-index: 2;
}

.book-cover:hover {
    transform: perspective(1000px) rotateY(-15deg) translateY(-10px) scale(1.05);
    box-shadow: 
        inset 4px 0 10px rgba(0, 0, 0, 0.5),
        25px 25px 40px rgba(0, 0, 0, 0.6);
}

.book-year {
    font-size: 0.9rem;
    color: var(--red-accent);
    margin-bottom: 1rem;
    font-weight: 300;
    z-index: 3;
}

.book-title {
    font-size: 1.3rem;
    line-height: 1.2;
    color: #eee;
    text-transform: uppercase;
    z-index: 3;
    word-wrap: break-word;
}

.review-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--red-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 300;
    padding: 3px 6px;
    border-radius: 3px;
    z-index: 5;
    letter-spacing: 0.1em;
}

/* Fallback background textures for when specific image isn't loaded */
.book-cover[data-author="kissinger"] {
    background: linear-gradient(135deg, #1a1010 0%, #301616 100%);
    border-left: 10px solid #5a1e1e;
}

.book-cover[data-author="carter"] {
    background: linear-gradient(135deg, #0e121a 0%, #17243b 100%);
    border-left: 10px solid #2a4066;
}

.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    padding: 0 1rem;
}

.mobile-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    font-family: inherit;
    font-weight: 300;
    cursor: pointer;
    flex: 1;
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mobile-nav-btn:hover {
    color: var(--red-accent);
}

/* ===== REVIEW ARTICLE ===== */
.review-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #eee;
    padding-bottom: 4rem;
}

.review-content p {
    margin-bottom: 1.5rem;
}

.review-content blockquote {
    border-left: 4px solid var(--red-accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #ccc;
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
}

.review-footnotes {
    margin-top: 4rem;
    border-top: 1px solid #444;
    padding-top: 2rem;
    font-size: 1rem;
    color: #999;
}

.review-footnotes p {
    margin-bottom: 0.8rem;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    .title-container {
        width: 80vw;
    }

    .menu-link {
        font-size: 2rem;
    }

    .portrait-grid {
        width: 80vw;
        height: 80vw;
        flex-shrink: 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .games-container {
        display: block;
        padding: 40px 1rem 50px 1rem;
        text-align: center;
        min-height: auto;
    }

    .games-list {
        width: 100%;
        gap: 1.5rem;
        margin: 0 auto;
    }

    .game-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .game-card h3 {
        font-size: 1.6rem;
    }

    .game-card p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .game-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .game-btn {
        text-align: center;
        width: 100%;
        padding: 0.8rem;
    }

    .library-title {
        font-size: 2rem;
    }

    .chronicle-container div[style*="display: flex"] {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1rem !important;
    }

    .chronicle-container .enter-btn {
        width: 80%;
    }

    .periodic-grid {
        grid-template-columns: repeat(10, 1fr); /* More readable on small screens */
        grid-template-rows: auto;
        width: 100%;
        height: auto;
        aspect-ratio: unset;
        gap: 2px;
    }

    .chronicle-year {
        font-size: 0.6rem;
        padding: 5px 0;
    }

    .chronicle-info-panel h3 {
        font-size: 1.5rem;
    }

    .chronicle-info-panel p {
        font-size: 1rem;
    }

    .back-abs, .close-menu-btn, .back-to-sa {
        top: 1rem;
        left: 1rem;
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .back-abs, .close-menu-btn, .back-to-sa {
        display: none !important;
    }

    .mobile-nav-bar {
        display: flex;
    }

    .view {
        padding-bottom: 80px; /* Space for mobile nav */
    }

    .back-to-sa {
        right: 1rem;
        left: auto;
    }

    .cinema-screen {
        flex: 0 0 85vw;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .cinema-screen h2 {
        font-size: 1.2rem;
    }

    .info-overlay h3 {
        font-size: 1.5rem;
    }

    .info-overlay p {
        font-size: 1rem;
    }

    .audio-track-card {
        width: 90%;
    }

    /* Chronicle Popup Mobile Adjustments */
    .popup-content {
        padding: 2.5rem 1rem 1.5rem 1rem;
        max-height: 85vh;
        width: 95vw;
        overflow-y: auto;
        display: block; /* Change from flex/inline-block to block for better scroll behavior */
    }

    .popup-nav-container {
        gap: 1rem;
    }

    #popup-year-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .popup-info-text {
        font-size: 1.05rem;
        line-height: 1.5;
        min-height: auto;
    }

    .nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .nav-mid-row {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .periodic-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .menu-link {
        font-size: 1.5rem;
    }
    
    .title-container {
        width: 90vw;
    }
}

.quotes-btn {
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    color: var(--text-color);
    background: transparent;
    border: 1px solid var(--red-accent);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 300;
}

.quotes-btn:hover {
    background: var(--red-accent);
    color: white;
}

/* Quotes Overlay */
.quotes-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none; /* Toggled by JS */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.quotes-overlay.active {
    display: flex;
}

.quote-nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 95%;
    max-width: 1200px;
    gap: 3rem;
}

.quote-nav-arrow {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-color);
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.quote-nav-arrow:hover {
    background: var(--red-accent);
    border-color: var(--red-accent);
    color: white;
}

.quote-container {
    flex-grow: 1;
    max-width: 800px;
}

.quote-text {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.4;
    margin-bottom: 2rem;
    font-style: italic;
    color: #f0f0f0;
}

.quote-author {
    font-size: 1.2rem;
    color: var(--red-accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 3rem;
}

.quote-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.quote-counter {
    font-size: 1rem;
    color: #666;
    letter-spacing: 0.1em;
}

.quote-next-btn {
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.quote-next-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.close-quotes-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.close-quotes-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* ===== ABOUT SECTION ===== */
.about-container {
    max-width: 900px;
    margin: 100px auto;
    padding: 0 2rem;
    text-align: center;
}

.about-content {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #ccc;
    text-align: left;
}

.about-content p {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .about-container {
        margin: 60px auto;
    }
    .about-content {
        font-size: 1.1rem;
    }
}

