/* =========================================
   1. BOND THEME CORE
   ========================================= */
:root {
    --bond-burgundy: #430102;
    --bond-champagne: #D9C5B2;
    /* A muted, silvery-beige gold */
    --bond-off-white: #F9F3E5;
    --bond-shadow: rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    color: var(--bond-cream);
}

body,
html {
    margin: 0;
    padding: 0;
    /* Deep Burgundy with a Radial Gradient Spotlight */
    background: radial-gradient(circle, #5a0203 0%, #430102 70%, #290101 100%) !important;
    background-attachment: fixed;
    /* Keeps background still while you scroll */
    min-height: 100vh;
    font-family: 'EB Garamond', serif;
}

/* Add a subtle "Noise/Grain" overlay for texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    /* Very subtle */
    pointer-events: none;
    z-index: 1;
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    /* Simple noise texture */
}

/* =========================================
   2. LOCKSCREEN (BOND CARD)
   ========================================= */
.lock-body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    background-color: var(--bond-burgundy) !important;
}

.card-wrapper {
    width: 300px;
    height: 420px;
}

.bond-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    /* ... keep existing styles ... */
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Adds a slight "bounce" at the end of the flip */

}

/* The Flip Trigger */
.bond-card.is-flipped {
    transform: rotateY(180deg);
}

/* --- UPDATED CARD & BUTTONS --- */
.card-side {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    /* Changed from yellow gold to a thin Champagne border */
    border: 1px solid var(--bond-champagne);
    box-shadow: 0 15px 35px var(--bond-shadow);
}

button,
.v-day-btn {
    font-family: 'Lustria', serif !important;
    /* Dark Burgundy background with Champagne text */
    background-color: var(--bond-burgundy) !important;
    color: var(--bond-champagne) !important;
    border: 1.5px solid var(--bond-champagne) !important;
    border-radius: 4px;
    /* Sharper corners feel more "Secret Agent" than round ones */
    padding: 12px 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: 0.4s;
}

button:hover {
    background-color: var(--bond-champagne) !important;
    color: var(--bond-burgundy) !important;
    box-shadow: 0 0 15px rgba(217, 197, 178, 0.4);
}

/* Back (Canva Design) */
.card-side.back {
    z-index: 2;
}

.card-side.back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13px;
}

.card-side.front {
    background: none;
    /* We are using the image now */
    transform: rotateY(180deg);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.front-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    border-radius: 12px;
}

/* --- BOND LOGIN OVERLAY --- */
.bond-login-overlay {
    position: relative;
    z-index: 2;
    width: 85%;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Space between input and button */
}

.bond-login-overlay input {
    flex: 1;
    /* Makes input take up remaining space */
    background: transparent !important;
    /* Fully transparent */
    border: none !important;
    border-bottom: 2px solid var(--bond-burgundy) !important;
    /* Elegant underline */
    color: var(--bond-burgundy) !important;
    font-family: 'Lustria', serif;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 10px 5px;
    outline: none;
}

/* Styling the placeholder text specifically */
.bond-login-overlay input::placeholder {
    color: var(--bond-burgundy);
    opacity: 0.7;
}

/* THE ROUND BUTTON */
.round-login-btn {
    width: 45px;
    height: 45px;
    min-width: 45px;
    /* Ensures it stays a circle */
    border-radius: 50% !important;
    /* Perfect circle */
    background-color: var(--bond-off-white) !important;
    color: var(--bond-champagne) !important;
    border: 1px solid var(--bond-champagne) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.round-login-btn:hover {
    transform: scale(1.1);
    background-color: transparent !important;
    color: var(--bond-burgundy) !important;
}

/* Error Message Styling */
#error {
    font-size: 0.8rem;
    color: var(--bond-burgundy) !important;
    margin-top: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

/* =========================================
   3. BUTTONS & UI
   ========================================= */
button,
.v-day-btn,
.close-btn {
    font-family: 'Lustria', serif !important;
    background-color: var(--bond-gold) !important;
    color: var(--bond-burgundy) !important;
    border: none !important;
    border-radius: 25px;
    padding: 12px 30px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
}

button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* =========================================
   4. NAVIGATION & SIDENAV
   ========================================= */
.menu-icon {
    position: fixed;
    top: 30px;
    left: 30px;
    cursor: pointer;
    /* Highest z-index to stay above the dossier */
    z-index: 9999;
    padding: 10px;
}

.bar {
    width: 30px;
    height: 3px;
    /* Using Champagne color so it pops against the Burgundy background */
    background-color: var(--bond-champagne) !important;
    margin: 6px 0;
    transition: 0.4s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Ensure the sidenav is also on top */
.sidenav {
    z-index: 10000;
}

.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 200;
    top: 0;
    left: 0;
    background-color: rgba(67, 1, 2, 0.98);
    /* Deep Burgundy blur */
    backdrop-filter: blur(10px);
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    border-right: 1px solid var(--bond-gold);
}

.sidenav a {
    padding: 15px 32px;
    font-family: 'Lustria', serif;
    font-size: 22px;
    display: block;
    text-decoration: none;
    /* This sets the main color of the text */
    color: var(--bond-champagne) !important;
    transition: 0.3s;
    letter-spacing: 1px;
    text-transform: capitalize;
}

/* This makes the items glow or change color when you hover */
.sidenav a:hover {
    color: #fff !important;
    /* Pure white on hover */
    padding-left: 45px;
    /* Subtle slide effect */
    background-color: rgba(255, 255, 255, 0.05);
    /* Very faint highlight */
}

/* The 'X' close button color */
.sidenav .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
    color: var(--bond-champagne) !important;
}


/* =========================================
   5. HOME CONTENT (VINTAGE FRAME)
   ========================================= */
.home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
}

.vintage-frame {
    display: table;
    border: 10px solid #D4AF37;
    /* Gold Frame */
    outline: 5px solid #430102;
    /* Inner Burgundy Edge */
    background: #000;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.2);
    line-height: 0;
    transition: transform 0.5s ease;
}

.vintage-frame:hover {
    transform: rotate(-1deg) scale(1.02);
    /* Subtle "tossed on the desk" feel */
}

.vintage-frame img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --- THE DOSSIER SKELETON --- */
.home-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    perspective: 2000px;
    background: radial-gradient(circle, #5a0203 0%, #430102 100%);
}

.dossier-container {
    position: relative;
    width: 320px;
    /* Width of one page */
    height: 450px;
    transform-style: preserve-3d;
    transition: transform 1s ease;
}

/* The Hinge (This is the cover that flips) */
.dossier-hinge {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
    transform-origin: left;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base style for the two sides of the hinge */
.page-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    /* Hides the "back" of the image */
}

/* Cover Image */
.page-face.front {
    z-index: 2;
}

/* Photo Page (Must be rotated 180deg to face the message when closed) */
.page-face.back {
    transform: rotateY(180deg);
}

/* The Static Message Page (Behind everything) */
.dossier-static-page {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.dossier-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- THE ANIMATION --- */
.dossier-container.is-open {
    transform: translateX(160px);
    /* Moves entire folder right to center the spread */
}

.is-open .dossier-hinge {
    transform: rotateY(-180deg);
    /* Swings cover open 180 degrees */
}



/* --- MESSAGE OVERLAY (RIGHT PAGE) --- */
.message-overlay {
    position: absolute;
    top: 15%;
    left: 10%;
    right: 10%;
    bottom: 15%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    pointer-events: none;
    /* Allows clicks to pass through to the dossier */
}

.typewriter-text {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #2b1d1d;
    /* Faded ink color */
    font-size: 0.9rem;
    line-height: 1.5;
    text-transform: uppercase;
    text-align: left;
    margin: 0;
    /* Makes the text look slightly transparent/ink-stamped */
    opacity: 0.85;
}

/* Ensure the static page content is correctly positioned */
.dossier-static-page {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- CODE-GENERATED DOSSIER STYLES --- */

:root {
    --manila-folder: #e3c18d;
    --paper-white: #f4f1ea;
    --stamp-red: #8b0000;
}

/* Base Paper Styling */
.page-face,
.right-page-paper {
    background-color: var(--paper-white);
    background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
    /* Subtle paper feel */
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.1), 5px 5px 15px rgba(0, 0, 0, 0.3);
}

/* The Cover (Manila Folder) */
.front-cover-paper {
    background-color: var(--manila-folder) !important;
    border-left: 5px solid #c4a473;
    /* The Spine */
}

.folder-tab {
    position: absolute;
    top: -30px;
    right: 0;
    width: 120px;
    height: 30px;
    background: var(--manila-folder);
    border-radius: 10px 10px 0 0;
    text-align: center;
    font-size: 10px;
    line-height: 30px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.4);
}

/* Stamp Effect */
.stamp-red {
    position: absolute;
    top: 20%;
    left: 10%;
    border: 4px double var(--stamp-red);
    color: var(--stamp-red);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    padding: 10px 20px;
    transform: rotate(-15deg);
    opacity: 0.7;
    font-size: 1.5rem;
}

/* Dossier Label */
.dossier-label {
    position: absolute;
    bottom: 40px;
    left: 20px;
    font-family: 'Courier New', monospace;
    color: #444;
    background: rgba(255, 255, 255, 0.5);
    padding: 5px 15px;
    border: 1px solid #aaa;
}


.typewriter-text {
    font-family: 'Special Elite', 'Courier New', monospace;
    color: #333;
    line-height: 1.6;
    padding: 40px;
}

/* Hinge & Open Logic (Keep from previous step) */
.dossier-container.is-open {
    transform: translateX(160px);
}

.is-open .dossier-hinge {
    transform: rotateY(-180deg);
}

/* --- THE FIX --- */

.dossier-hinge {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
    transform-origin: left;
    transform-style: preserve-3d;
    /* Allows children to live in 3D space */
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-face {
    position: absolute;
    width: 100%;
    height: 100%;
    /* This hides the "reverse" side of each face */
    backface-visibility: hidden;
}

/* Cover sits on the front */
.front-cover-paper {
    z-index: 2;
    transform: rotateY(0deg);
}

/* Photo page is rotated 180 degrees initially (hidden) */
.inside-left-paper {
    transform: rotateY(180deg);
    z-index: 1;
    /* Give the photo page the same manila/paper color */
    background-color: var(--paper-white);
}

/* When the folder opens... */
.is-open .dossier-hinge {
    transform: rotateY(-180deg);
}


/* --- UPDATED COLORS & PHOTO ALIGNMENT --- */

:root {
    --manila-folder: #e3c18d;
    /* Classic folder color */
    --paper-white: #f4f1ea;
    /* Right side paper color */
}

/* Make the Inside Left match the Manila Cover */
.inside-left-paper {
    transform: rotateY(180deg);
    z-index: 1;
    background-color: var(--manila-folder) !important;
    /* Unified color */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Photo Frame - Fits the photo tightly */


/* Ensure the Right Page remains distinct (The Paper) */
.right-page-paper {
    background-color: var(--paper-white);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    /* Subtle "seam" where folder folds */
}

.message-content {
    background: var(--paper-white);
    width: 90%;
    height: 90%;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
    /* Makes it look layered */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- COLORS & FOLDER UNIFICATION --- */
:root {
    --manila-folder: #e3c18d;
    --sticky-yellow: #fdfd96;
    /* Classic Post-it yellow */
}

/* Make both sides of the open folder the same Manila color */
.inside-left-paper,
.right-page-paper {
    background-color: var(--manila-folder) !important;
    background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
}

/* --- PHOTO PLACEMENT (UP AND LEFT) --- */
/* --- 1. THE FOLDER UNIFICATION --- */
.inside-left-paper,
.right-page-paper {
    background-color: var(--manila-folder) !important;
    background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
    position: absolute;
    width: 100%;
    height: 100%;
}

/* --- 2. PRIMARY PHOTO (Top-Left) --- */
.photo-overlay-clean {
    position: absolute;
    top: 5%;
    /* Moved up */
    left: 5%;
    /* Moved left */
    width: 65%;
    /* Sized to fit */
    z-index: 5;
    line-height: 0;
    /* Prevents ghost spacing */
}

.agent-photo-tilted {
    width: 100%;
    height: auto;
    transform: rotate(-6deg);
    filter: grayscale(1) contrast(1.1) sepia(0.2);
    box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.4);
    display: block;
}

/* --- 3. SECONDARY PHOTO (Bottom-Right) --- */
.photo-overlay-secondary {
    position: absolute;
    top: 45%;
    /* Positioned lower */
    left: 35%;
    /* Positioned further right */
    width: 55%;
    /* Slightly smaller */
    z-index: 6;
    /* Sits on top of the first photo */
    line-height: 0;
}

.agent-photo-tilted-alt {
    width: 100%;
    height: auto;
    transform: rotate(8deg);
    /* Tilted opposite direction */
    filter: grayscale(1) contrast(1.1) sepia(0.2);
    box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.4);
    display: block;
}

/* --- 4. THE STICKY NOTE --- */
.sticky-note {
    position: relative;
    width: 80%;
    height: auto;
    min-height: 200px;
    background-color: var(--paper-white);
    /* Change to #fdfd96 for classic yellow */
    padding: 25px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(2deg);
    border-bottom-right-radius: 40px 5px;
}


/* Specific text for the note */
.typewriter-text {
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
    text-align: left;
}

/* --- MUSEUM / GALLERY STYLES --- */

.museum-body {
    overflow-y: auto !important;
    display: block !important;
    background: radial-gradient(circle, #3d0102 0%, #1a0101 100%) !important;
}

.museum-container {
    padding: 120px 20px 100px;
    /* More top padding for visibility */
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    /* Ensures it sits above any background noise */
}

/* Fix for dark titles */
.museum-title {
    font-family: 'Special Elite', monospace;
    color: var(--bond-champagne) !important;
    font-size: 3rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.museum-subtitle {
    color: var(--bond-off-white) !important;
    opacity: 0.9;
    font-size: 1.2rem;
    margin-bottom: 50px;
}

/* THE FIXED GRID */
.museum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    /* Forces exactly 3 columns */
    gap: 30px;
    align-items: center;
}

/* Swirly Ornate Frame Look */
.museum-item {
    background: var(--bond-off-white);
    padding: 15px;
    border: 8px solid #fff;
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.5);
    line-height: 0;
}

.museum-item img,
.museum-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border: 1px solid #ddd;
}

/* Subtle tilts */
.tilt-left {
    transform: rotate(-1.5deg);
}

.tilt-right {
    transform: rotate(1.5deg);
}

/* Centering the video in the second row */
.video-frame {
    grid-column: 2;
    /* Forces it to the middle column */
    background: #000;
    border-color: var(--bond-off-white);
}

/* --- THE WALL BUTTON --- */
.wall-section {
    margin-top: 60px;
    padding-bottom: 100px;
}

/* --- THE CLASSIFIED WALL GRID --- */
.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px;
    margin-top: 20px;
}

/* The Swirly Frame Style you liked */
.wall-frame {
    position: relative;
    background: var(--bond-off-white);
    padding: 12px;
    border: 8px solid #fff;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1), 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    animation: fadeIn 0.5s ease forwards;
}

.wall-frame img,
.wall-frame video {
    width: 100%;
    height: auto;
    /* Automatically fits the media */
    display: block;
    border: 1px solid #ddd;
}

/* Remove Button (The 'X') */
.remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--bond-burgundy);
    color: white;
    border: 2px solid var(--bond-champagne);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Force 3-column grid and fix missing frames */
.museum-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Strictly 3 columns */
    gap: 30px;
    margin-bottom: 30px;
    width: 100%;
}

/* THE SWIRLY FRAME: Ornate Off-White */
.museum-item,
.wall-frame {
    position: relative;
    background: var(--bond-off-white);
    padding: 15px;
    border: 10px solid var(--bond-off-white);
    /* This shadow creates the "swirly/molded" depth look */
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.05),
        inset 0 0 20px rgba(0, 0, 0, 0.1),
        0 15px 35px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease;
}

.museum-item img,
.museum-item video {
    width: 100%;
    height: auto;
    display: block;
}

/* DELETE BUTTON: Sleek "Tape" or "Stamp" look instead of a bubble */
.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--bond-burgundy);
    color: var(--bond-champagne);
    border: 1px solid var(--bond-champagne);
    cursor: pointer;
    font-family: 'Special Elite', monospace;
    z-index: 20;
    padding: 2px 8px;
    font-size: 14px;
    opacity: 0;
    /* Hidden until hover */
    transition: 0.3s;
}

.museum-item:hover .remove-btn {
    opacity: 1;
}

/* FOOTER BUTTON POSITIONING */
.upload-footer {
    text-align: center;
    padding: 50px 0;
    width: 100%;
}

/* Mobile Tweak: Drop to 1 column so it doesn't break */
@media (max-width: 800px) {
    .museum-grid {
        grid-template-columns: 1fr;
    }
}

.menu-icon {
    z-index: 1000 !important;
    position: fixed;
    /* Ensures it stays visible while scrolling */
}

.sidenav {
    z-index: 2000 !important;
}

.upload-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    width: 100%;
    clear: both;
    /* Ensures it stays below all grid items */
}

.v-day-btn {
    margin: 0 auto;
    display: block;
}

.museum-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centers the titles and the button */
    min-height: 100vh;
}

.upload-footer {
    margin-top: auto;
    /* Pushes button to bottom of the container */
    padding: 60px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Ensure the grid doesn't squash items */
#classifiedWall {
    width: 100%;
    margin-top: 0;
    /* Align directly under main grid */
}

/* --- RESTORED LOVE LETTERS STYLES --- */

.notes-container {
    padding: 100px 20px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

/* Make sure the text is readable on the paper */
.black-text {
    color: #222 !important;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* THE ENVELOPE DESIGN */
.envelope {
    position: relative;
    width: 200px;
    height: 140px;
    background: #f4f1ea;
    margin: auto;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

.envelope:hover {
    transform: translateY(-10px) rotate(2deg);
}

.envelope-paper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* The Triangular Flap */
.flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-top: 70px solid #dcd7c9;
    z-index: 2;
}

.stamp-date {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-family: 'Special Elite', monospace;
    color: var(--bond-burgundy);
    font-weight: bold;
    font-size: 0.8rem;
    border: 1px solid var(--bond-burgundy);
    padding: 2px 5px;
    transform: rotate(-5deg);
}

/* THE SCROLL/PAPER OVERLAY */
.scroll-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    /* Controlled by JS */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.scroll-paper {
    background: #fdfaf3;
    background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
    width: 85%;
    max-width: 500px;
    padding: 40px;
    border: 1px solid #dcd7c9;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: rotate(-1deg);
}

.handwriting {
    font-family: 'Lustria', serif;
    /* Or any handwriting font you have */
    line-height: 1.6;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* DELETE BUTTON */
.delete-note {
    position: absolute;
    top: -10px;
    left: -10px;
    background: var(--bond-burgundy);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    z-index: 10;
}

.museum-item {
    background: var(--bond-off-white);
    padding: 15px;
    border: 10px solid var(--bond-off-white);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.05),
        /* Outer rim */
        inset 0 0 20px rgba(0, 0, 0, 0.15),
        /* Inner groove */
        10px 20px 40px rgba(0, 0, 0, 0.6);
    /* Depth shadow */
}

/* Envelope Geometry */
.envelope {
    position: relative;
    width: 200px;
    height: 130px;
    background: #f4f1ea;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15px;
}

.envelope:hover {
    transform: translateY(-8px) rotate(2deg);
}

.flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-top: 70px solid #dcd7c9;
    /* The triangular fold */
    z-index: 2;
}

/* Modal/Overlay Logic */
.scroll-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    /* JS toggles this to 'flex' */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.scroll-paper {
    background: #fdfaf3;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #dcd7c9;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.black-text {
    color: #222 !important;
}

#newNoteMessage {
    width: 100%;
    height: 150px;
    font-family: 'EB Garamond', serif;
    padding: 10px;
    border: 1px solid #ccc;
    color: #222;
}

/* --- UNIVERSAL BOND BUTTON STYLE --- */
button,
.v-day-btn,
.black-btn,
.add-note-btn,
.clear-btn {
    /* Background is the deep burgundy from your theme */
    background-color: var(--bond-burgundy) !important;
    /* Text is the bright Champagne gold */
    color: var(--bond-champagne) !important;
    border: 1.5px solid var(--bond-champagne) !important;

    padding: 12px 25px;
    font-family: 'Lustria', serif !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    z-index: 10;
    opacity: 1 !important;
    /* Force visibility */
    visibility: visible !important;
}

/* Hover Effect: Invert colors */
button:hover,
.v-day-btn:hover {
    background-color: var(--bond-champagne) !important;
    color: var(--bond-burgundy) !important;
    box-shadow: 0 0 15px rgba(217, 197, 178, 0.4);
}

/* Specific fix for the Museum "Remove" button (The X) */
.remove-btn {
    background: var(--bond-burgundy) !important;
    color: var(--bond-champagne) !important;
    border: 1px solid var(--bond-champagne) !important;
    opacity: 0.8;
    /* Slightly see-through until hover */
    padding: 2px 8px !important;
    font-size: 12px !important;
    border-radius: 0 !important;
    /* Square 'stamp' look */
}

.museum-item:hover .remove-btn {
    opacity: 1 !important;
}

/* Ensure inputs (Date pickers) are also visible */
input[type="date"],
textarea {
    background: #fff !important;
    color: #222 !important;
    border: 1px solid var(--bond-champagne) !important;
    padding: 8px;
    font-family: 'EB Garamond', serif;
}

.upload-footer {
    display: flex;
    justify-content: center;
    padding: 80px 0;
    width: 100%;
    position: relative;
    z-index: 5;
    clear: both;
}

.note-controls {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

/* The 'X' to delete envelopes */
.delete-note {
    background: var(--bond-burgundy) !important;
    color: var(--bond-champagne) !important;
    border: 1px solid var(--bond-champagne) !important;
    font-family: Arial, sans-serif;
    font-weight: bold;
    cursor: pointer;
}

/* --- THE FONT HIERARCHY --- */

/* 1. CINZEL: Cinematic, Bold, Sharp (Titles & Menu) */
h1,
.museum-title,
.static-title,
.sidenav a {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* 2. SPECIAL ELITE: Gritty Typewriter (Stamps, Dates, ID Numbers) */
.stamp-date,
.museum-subtitle,
.typewriter-text,
.folder-tab,
.remove-btn {
    font-family: 'Special Elite', cursive !important;
}

/* 3. PLAYFAIR DISPLAY: Elegant, High-Contrast Serif (Love Letters) */
.handwriting,
#scrollText,
.notes-body p {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* 4. COURIER PRIME: Clean Monospace (Inputs and Forms) */
input,
textarea,
button,
.v-day-btn {
    font-family: 'Courier Prime', monospace !important;
    letter-spacing: 1px;
}

/* 5. EB GARAMOND: Base Body Text */
body {
    font-family: 'EB Garamond', serif;
}

/* Make titles pop more */
.museum-title {
    font-weight: 700;
    font-size: 3.5rem !important;
    color: var(--bond-champagne) !important;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
}

/* Make the Love Letter text look like a real letter */
#scrollText {
    font-style: italic;
    color: #222 !important;
}

/* Adjust button text to feel more like a military stamp */
button,
.v-day-btn {
    font-weight: bold;
    font-size: 0.9rem;
    padding: 14px 32px;
}