:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --font-primary: 'Syne', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;

    --color-studio: #000080;
    --color-sound: #800020;
    --color-press: #E0D080;
    --color-marketing: #106030;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-secondary);
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Login Screen --- */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.apple-login {
    position: relative;
    width: 300px;
}

#password-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 12px;
    padding: 15px;
    color: white;
    font-size: 1.2rem;
    font-family: var(--font-secondary);
    outline: none;
    text-align: center;
}

#password-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* --- Header --- */
.archives-header {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: auto;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    /* Match main index.html size */
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.1em;
}

/* --- Main Content --- */
#main-content {
    padding: 8rem 2rem 4rem;
    /* Add top padding to avoid overlap with absolute header */
    max-width: 1200px;
    margin: 0 auto;
    transition: opacity 1s ease;
}

.gradient-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    /* Match logo size */
    font-weight: 800;
    background: linear-gradient(45deg, var(--color-studio), var(--color-sound), var(--color-press), var(--color-marketing));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.video-section {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.video-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.book-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
}

.book-item:hover {
    transform: translateY(-5px);
}

.book-cover {
    width: 100%;
    aspect-ratio: 2/3;
    background: #E0D080;
    /* Desaturated Yellow */
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: bold;
    color: #050505;
    padding: 10px;
    word-break: break-word;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --- Reader Overlay --- */
#reader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    /* Default theme */
    color: #000;
    z-index: 10000;
    display: none;
    /* Hidden */
    flex-direction: column;
}

#reader-header {
    height: 60px;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

#reader-area {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#reader-footer {
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Liquid Menu */
#liquid-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    gap: 1rem;
    color: #000;
}

.menu-group {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

button {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
}

button.active {
    background: currentColor;
    /* Use text color as bg */
    color: var(--bg-color);
    /* Invert text */
}

.theme-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #999;
}

.theme-btn.light {
    background: #fff;
}

.theme-btn.sepia {
    background: #f4ecd8;
}

.theme-btn.dark {
    background: #333;
}

/* Dark Reader Theme overrides */
#reader-overlay.dark-theme {
    background: #333;
    color: #ccc;
}

#reader-overlay.sepia-theme {
    background: #f4ecd8;
    color: #5b4636;
}