/* ========================================= */
/* 1. GLOBAL MASTER LAYOUT & NAVIGATION      */
/* ========================================= */

:root {
    /* DEFAULT LIGHT MODE VARIABLES */
    --outer-bg-image: url('Images/Modern/white.jpg');
    --page-bg: #f6f6f6;
    --hero-bg-image: url('Images/Modern/image1.png');
    --main-text: #333333;
    --header-text: #777777;
    --sub-text: #888888;

    --global-font-stack: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* DARK MODE OVERRIDE VARIABLES (Fires when JS adds the class) */
body.dark-mode {
    --outer-bg-image: url('Images/Modern/black.jpg');
    --page-bg: #1a1a1a; /* Deep charcoal/black */
    --hero-bg-image: url('Images/Modern/image1.png');
    --main-text: #eeeeee;
    --header-text: #bbbbbb;
    --sub-text: #999999;
}

* {
    box-sizing: border-box;
}

body {
    background-image: var(--outer-bg-image);
    background-repeat: repeat;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    font-family: var(--global-font-stack);
    color: var(--main-text);
    overflow: hidden;
    transition: background-image 0.3s ease; /* Smooth fade when switching backgrounds */
}

.floating-viewport {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    padding-top: 40px;
    padding-bottom: 120px;
}

.page-container {
    width: 900px;
    margin: 0 auto;
    background-color: var(--page-bg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    min-height: 900px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* ========================================= */
/* 2. THE THREE-ZONE NAVIGATION DOCK         */
/* ========================================= */

.frosted-glass-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    max-width: 95%;
    padding: 12px 25px;
    /* Darkened the glass slightly for contrast */
    background-color: rgba(200, 200, 200, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
}

.nav-left { display: flex; justify-content: flex-start; }
.nav-center { display: flex; justify-content: center; gap: 10px; }
.nav-right { display: flex; justify-content: flex-end; }

/* Fixed readability: Inactive links are now dark grey */
.frosted-glass-nav a {
    color: #444444;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    padding: 10px 18px;
    background-color: transparent;
    border-radius: 30px;
    transition: all 0.2s;
    white-space: nowrap;
}

/* Hover and Active states become white with black text */
.frosted-glass-nav a:hover, .frosted-glass-nav a.active {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Specific button overrides */
#dark-mode-toggle {
background-color: #333333;
color: #ffffff;
}
#dark-mode-toggle:hover {
background-color: #000000;
}

.next-vol {
    background-color: rgba(217, 37, 37, 0.8) !important;
    color: #ffffff !important;
}
.next-vol:hover {
    background-color: rgba(217, 37, 37, 1) !important;
}

/* ========================================= */
/* 3. TEMPLATE 1: MODERN (Snowboarder)       */
/* ========================================= */

.modern-hero {
    position: relative;
    width: 100%;
    height: 480px;
    background-image: var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    transition: background-image 0.3s ease;
}

.modern-hero-text-block {
    position: absolute;
    bottom: 40px;
    right: 50px;
    width: 400px;
}

.modern-hero-text-block h2 {
    color: #ff3300;
    font-size: 26px;
    font-weight: bold;
    margin: 0 0 8px 0;
}

/* Make red header yellow in dark mode */
body.dark-mode .modern-hero-text-block h2 {
    color: #ff3300;
}

.modern-hero-text-block p {
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
    margin: 0;
}

.modern-columns {
    display: flex;
    padding: 40px 50px;
    gap: 30px;
}

.modern-col { flex: 1; }

.modern-col h3 {
    font-size: 16px;
    color: var(--header-text);
    margin: 0 0 12px 0;
}

.modern-col p {
    font-size: 13px;
    color: var(--sub-text);
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.modern-album-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Image borders switch from white to dark grey in dark mode */
.modern-album-item img {
    width: 100%;
    border: 4px solid #ffffff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    display: block;
    transition: border-color 0.3s ease;
}

body.dark-mode .modern-album-item img {
    border-color: #333333;
}

.modern-album-item p {
    margin-top: 8px;
    text-align: left;
    font-size: 12px;
    color: var(--sub-text);
}

/* ========================================= */
/* MADE ON A MAC FOOTER                      */
/* ========================================= */

.mac-footer {
    text-align: center;
    padding: 20px 0 40px 0;
    width: 100%;
}

.mac-footer img {
    width: 40px;
    height: auto;
    margin-bottom: 5px;
}

.mac-footer p {
    font-size: 11px;
    color: #888888;
    margin: 0;
    font-weight: bold;
}

/* Light Mode Logic: Show black, hide white */
.apple-logo-light { display: inline-block; }
.apple-logo-dark { display: none; }

/* Dark Mode Logic: Hide black, show white */
body.dark-mode .apple-logo-light { display: none; }
body.dark-mode .apple-logo-dark { display: inline-block; }

/* Dim the text slightly in dark mode to match */
body.dark-mode .mac-footer p {
    color: #666666;
}





/* ========================================= */
/* TEMPLATE 2: NIGHT LIFE (1:1 iWeb Rebuild) */
/* ========================================= */

.nightlife-theme {
    --outer-bg-image: none;
    background-color: #111111 !important;
    --page-bg: transparent;
}

.nl-hero {
    width: 100%;
    height: 180px;
    background-image: url('Images/NightLife/hero.jpg');
    background-size: cover;
    background-position: center;
}

.nl-paper-wrapper {
    width: 820px;
    max-width: 100%; /* Important for mobile */
    margin: -40px auto 0 auto;
    position: relative;
    z-index: 10;
}

/* TORN EDGE LOGIC:
 *  If you use the original tiny iWeb image, change 'background-size' to 'auto'
 *  and add 'background-repeat: repeat-x;' */
.nl-torn-top {
    height: 60px;
    background-image: url('Images/NightLife/torn-top.png');
    background-size: 100% 100%;
    position: relative;
    z-index: 5;
}

.nl-torn-bottom {
    height: 60px;
    background-image: url('Images/NightLife/torn-bottom.png');
    background-size: 100% 100%;
}

.nl-paper-content {
    background-color: #f4ecd8;
    background-image: url('Images/NightLife/paper-texture-light.jpg');
    background-repeat: repeat;
    padding: 0 40px 20px 40px;
    color: #000000;
    transition: background-image 0.3s ease;
}

/* THE MAGIC OVERLAP TRICK */
.nl-main-title {
    font-family: 'Creepster', cursive;
    color: #ff3300;
    font-weight: normal;
    font-size: 85px;
    line-height: 0.8;

    /* This forces the text to sit on top of the torn edge */
    position: absolute;
    top: 5px;
    left: 40px;
    z-index: 20;
    margin: 0;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.nightlife-theme h2 {
    font-family: 'Creepster', cursive;
    color: #ff3300;
    font-weight: normal;
    font-size: 38px;
    line-height: 1;
    margin: 0;
    margin-top: 20px;
}

.nightlife-theme h3 {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    margin: 0 0 10px 0;
}

.nl-red { color: #ff3300; }

.nl-row-top { display: flex; gap: 30px; margin-bottom: 40px; margin-top: 40px; }
.nl-col-profile { flex: 1.2; }
.nl-col-stats { flex: 1; }
.nl-col-friends { flex: 1; }

.nl-profile-img { width: 100%; border: 1px solid #000; box-shadow: 2px 2px 5px rgba(0,0,0,0.3); }

.nl-col-stats hr { border: none; border-top: 2px solid #000; margin: 5px 0; }
.nl-suzi { font-weight: bold; font-size: 14px; margin: 5px 0; }
.nl-stat-list { font-size: 11px; line-height: 1.4; }

.nl-friend-item { display: flex; gap: 10px; margin-bottom: 12px; }
.nl-friend-item img { width: 45px; height: 45px; border: 1px solid #999; }
.nl-friend-item p { font-size: 10px; margin: 0; line-height: 1.3; }

.nl-row-bottom { display: flex; gap: 40px; }
.nl-col-life { flex: 2; }
.nl-col-sidebar { flex: 1; }

.nl-col-life p { font-size: 12px; line-height: 1.5; text-align: justify; }

.nl-float-right { float: right; margin: 0 0 10px 15px; border: 1px solid #000; max-width: 50%; }
.nl-float-left { float: left; margin: 0 15px 5px 0; border: 1px solid #000; max-width: 50%; }

.nl-music-list, .nl-links-list { padding-left: 20px; font-size: 11px; line-height: 1.4; margin-bottom: 25px; }

/* ========================================= */
/* NIGHT LIFE: BURNT PAPER DARK MODE         */
/* ========================================= */

body.dark-mode .nightlife-theme .nl-paper-content {
    background-color: #2b2520;
    background-image: url('Images/NightLife/paper-texture-dark.jpg');
    color: #dddddd;
}

body.dark-mode .nightlife-theme h3 { color: #ffffff; }

body.dark-mode .nightlife-theme .nl-profile-img,
body.dark-mode .nightlife-theme .nl-float-right,
body.dark-mode .nightlife-theme .nl-float-left {
    border: 1px solid #111111;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.8);
}

/* ========================================= */
/* GLOBAL MOBILE RESPONSIVENESS              */
/* ========================================= */

@media only screen and (max-width: 768px) {
    /* Break the fixed 900px width on phones */
    .page-container {
        width: 100% !important;
        margin: 0 !important;
        box-shadow: none;
    }

    .nl-paper-wrapper { width: 100%; }

    /* Force columns to stack vertically on small screens */
    .nl-row-top,
    .nl-row-bottom,
    .modern-columns {
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Fix header overlap scale on mobile */
    .nl-main-title {
        font-size: 60px !important;
        left: 20px;
        top: 15px;
    }

    /* Prevent images from breaking out of the columns */
    .nl-float-right, .nl-float-left {
        max-width: 100%;
        float: none;
        display: block;
        margin: 0 auto 15px auto;
    }
}





/* ========================================= */
/* TEMPLATE 3: FREESTYLE                     */
/* ========================================= */

.freestyle-theme {
    --outer-bg-image: url('Images/Freestyle/concrete-outer.jpg');
    --page-bg: #e6e6e6; /* Concrete grey */
    /* Add a subtle concrete texture to the main page */
    background-image: url('Images/Freestyle/concrete-texture.jpg');
    background-repeat: repeat;
}

.fs-hero {
    width: 100%;
    height: 140px;
    background-image: url('Images/Freestyle/grunge-banner.jpg');
    background-color: #333;
    display: flex;
    align-items: center;
    padding-left: 40px;
    border-bottom: 2px solid #222;
}

.fs-hero h1 {
    font-family: 'Allerta Stencil', sans-serif;
    color: #e65c00; /* iWeb Orange */
    font-size: 55px;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.fs-columns {
    display: flex;
    padding: 30px 40px;
    gap: 40px;
}

.fs-left-col { flex: 1.4; }
.fs-right-col { flex: 1; }

/* The Scrapbook Collage */
.fs-collage-wrapper {
    position: relative;
    height: 480px;
    margin-bottom: 30px;
}

.fs-bg-text-top, .fs-bg-text-bottom {
    font-family: 'Allerta Stencil', sans-serif;
    color: rgba(0, 0, 0, 0.1);
    font-size: 50px;
    position: absolute;
    z-index: 1;
}

.fs-bg-text-top { top: 0; right: 20px; }
.fs-bg-text-bottom { bottom: 0; right: 0; font-size: 70px; }

/* Overlapping Photos */
.fs-photo-1, .fs-photo-2, .fs-photo-3 {
    position: absolute;
    border: 5px solid #fff;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.4);
    z-index: 5;
}

.fs-photo-1 { top: 20px; left: 0; }
.fs-photo-2 { top: 40px; right: 20px; z-index: 4; }
.fs-photo-3 { top: 200px; left: 40px; z-index: 6; }

/* Left Column Text */
.fs-main-text h2 {
    font-family: 'Courier New', Courier, monospace;
    color: #555;
    font-size: 24px;
    margin-bottom: 10px;
}

.fs-main-text p {
    font-family: Georgia, serif;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

/* Right Column Yellow Note */
.fs-yellow-note {
    background-color: #e5d8a5; /* Yellow notepad base */
    background-image: url('Images/Freestyle/yellow-note.png');
    background-size: 100% 100%;
    padding: 20px 25px 30px 25px;
    transform: rotate(2deg); /* Gives it that taped-on look */
    box-shadow: 3px 3px 8px rgba(0,0,0,0.2);
    margin-bottom: 40px;
}

.fs-yellow-note h2 {
    font-family: 'Allerta Stencil', sans-serif;
    color: #333;
    font-size: 30px;
    margin: 0 0 15px 0;
}

.fs-yellow-note p {
    font-family: 'Comic Sans MS', cursive, sans-serif; /* Authentic 2006 handwriting font fallback */
    font-size: 12px;
    margin: 5px 0;
    color: #444;
    line-height: 1.4;
}

.fs-yellow-note strong { font-family: sans-serif; font-size: 10px; text-transform: uppercase; }

/* Sidebars */
.fs-sidebar-content h3 {
    font-family: 'Allerta Stencil', sans-serif;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    font-size: 16px;
    margin: 25px 0 10px 0;
}

.fs-album-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fs-album-item img {
    border: 2px solid #ccc;
}

.fs-album-item p {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #832719; /* Deep rust red */
    font-size: 11px;
    margin: 0;
}

.fs-list {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #832719;
    font-size: 11px;
    padding-left: 20px;
    line-height: 1.5;
}

.fs-bullet-list {
    list-style-type: square;
}

/* ========================================= */
/* FREESTYLE DARK MODE                       */
/* ========================================= */

body.dark-mode .freestyle-theme {
    --page-bg: #222;
    background-image: none; /* Strip texture for dark mode */
}

body.dark-mode .fs-main-text h2,
body.dark-mode .fs-main-text p {
    color: #ccc;
}





/* ========================================= */
/* TEMPLATE 4: ROAD TRIP (1:1 iWeb Rebuild)  */
/* ========================================= */

.roadtrip-theme {
    --outer-bg-image: none;
    /* Real Dark Wood Texture URL */
    background-image: url('https://images.unsplash.com/photo-1533090161767-e6ffed986c88?auto=format&fit=crop&w=1200&q=80');
    background-color: #3b2c24; /* Fallback brown */
    background-size: cover;
    background-position: center;
    --page-bg: transparent;
}

.rt-header {
    padding: 30px 40px 10px 40px;
}

.rt-header h1 {
    font-family: 'Special Elite', Courier, monospace;
    color: #e5d8b8; /* Faded tan/white */
    font-size: 32px;
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin: 0;
}

.rt-desk-area {
    display: flex;
    padding: 20px 40px;
    gap: 40px;
    position: relative;
    z-index: 10;
}

/* --- THE CSS NOTEBOOK --- */
.rt-notebook {
    flex: 1.2;
    background-color: #f6eed5; /* Aged paper color */
    /* This creates the actual blue lines and red margin line in pure CSS! */
    background-image:
    linear-gradient(90deg, transparent 50px, #d68787 50px, #d68787 52px, transparent 52px),
    repeating-linear-gradient(0deg, transparent, transparent 27px, #a6cce3 27px, #a6cce3 28px);
    border-radius: 5px;
    box-shadow: 8px 8px 20px rgba(0,0,0,0.6), inset 0 0 15px rgba(0,0,0,0.1);
    padding: 30px 20px 40px 60px; /* Left padding clears the red line */
    transform: rotate(-2deg); /* Tilted on the desk */
    position: relative;
    z-index: 5;
}

.rt-stencil {
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    color: #444;
    font-size: 26px;
    letter-spacing: -1px;
    margin: 0 0 20px 0;
    transform: scaleY(1.5); /* Stretches the font tall like the stencil */
}

.rt-star {
    position: absolute;
    font-size: 16px;
}

/* The Polaroids */
.rt-photo-cluster {
    position: relative;
    height: 250px;
    margin-bottom: 20px;
}

.rt-polaroid {
    background: #fff;
    padding: 8px 8px 25px 8px; /* Classic polaroid thick bottom border */
    box-shadow: 3px 3px 10px rgba(0,0,0,0.4);
    position: absolute;
}

.rt-polaroid img {
    display: block;
    max-width: 100%;
    height: auto;
}

.rt-tilt-left {
    transform: rotate(-12deg);
    top: 20px;
    left: -20px;
    width: 140px;
    z-index: 2;
}

.rt-main-photo {
    transform: rotate(4deg);
    top: 0;
    left: 80px;
    width: 220px;
    z-index: 3;
}

/* Masking tape built with CSS */
.rt-tape {
    width: 80px;
    height: 25px;
    background-color: rgba(230, 225, 200, 0.6);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    backdrop-filter: blur(2px);
    z-index: 4;
}

/* Handwritten Text */
.rt-handwriting {
    font-family: 'Indie Flower', cursive;
    color: #3b5998; /* Ink blue */
    font-size: 20px;
    line-height: 28px; /* Perfectly matches the blue CSS lines! */
    margin-top: 10px;
}

.rt-handwriting p { margin: 0; }
.rt-prompt { font-family: 'Special Elite', monospace; font-size: 12px; color: #666; }

/* --- THE TORN RECEIPT --- */
.rt-receipt-wrapper {
    flex: 1;
    position: relative;
    transform: rotate(1deg);
    margin-top: 20px;
    z-index: 4;
}

.rt-thumbtack {
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 30px;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    transform: rotate(45deg);
}

.rt-receipt {
    background-color: #f4f4f4; /* Slightly off-white */
    padding: 30px 20px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    background-image: radial-gradient(#e5e5e5 1px, transparent 1px);
    background-size: 10px 10px; /* Subtle paper texture */
}

/* Jagged bottom edge using CSS zig-zag mask */
.rt-receipt-jagged {
    height: 15px;
    background-color: #f4f4f4;
    background-image: linear-gradient(-45deg, transparent 10px, #f4f4f4 0), linear-gradient(45deg, transparent 10px, #f4f4f4 0);
    background-position: left bottom;
    background-repeat: repeat-x;
    background-size: 20px 20px;
    filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.5));
}

.rt-receipt h3 {
    font-family: 'Special Elite', monospace;
    color: #635071; /* Faded purple ink */
    font-size: 18px;
    margin: 0 0 10px 0;
}

.rt-typewriter-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-family: 'Special Elite', monospace;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
}

.rt-divider {
    border-bottom: 1px dashed #ccc;
    margin: 20px 0;
}

.rt-album-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.rt-album-item img {
    border: 3px solid #fff;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.rt-album-item p {
    font-family: 'Special Elite', monospace;
    color: #635071;
    font-size: 12px;
    margin: 0;
    font-weight: bold;
}

.rt-tilt-slight {
    position: relative;
    transform: rotate(-3deg);
    width: 180px;
    margin-bottom: 20px;
}

.rt-paperclip {
    position: absolute;
    top: 30px;
    right: -20px;
    font-size: 40px;
    transform: rotate(70deg);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    z-index: 5;
}

.rt-receipt-text {
    font-family: 'Special Elite', monospace;
    color: #444;
    font-size: 12px;
    line-height: 1.5;
}

/* --- BOTTOM CLUTTER --- */
.rt-clutter {
    position: absolute;
    bottom: -60px;
    left: 20px;
    width: 100%;
    z-index: 1;
}

.rt-map {
    position: absolute;
    bottom: 0;
    left: 0;
    transform: rotate(3deg);
    border: 2px solid #fff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    z-index: 1;
}

.rt-sugar {
    position: absolute;
    bottom: -20px;
    left: -10px;
    background: #fff;
    padding: 5px 10px;
    font-family: 'Arial Black', sans-serif;
    color: #1c4587;
    font-size: 14px;
    transform: rotate(-15deg);
    box-shadow: 1px 1px 4px rgba(0,0,0,0.4);
    border-radius: 2px;
    z-index: 2;
}

.rt-keys {
    position: absolute;
    bottom: -30px;
    left: 120px;
    font-size: 50px;
    transform: rotate(110deg);
    filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.6));
    z-index: 3;
}

/* ========================================= */
/* ROAD TRIP DARK MODE                       */
/* ========================================= */
body.dark-mode .roadtrip-theme {
    /* Dim the wood */
    background-color: #1a1410;
    background-blend-mode: multiply;
}

body.dark-mode .rt-notebook {
    background-color: #d8cdb4; /* Darker aged paper */
    box-shadow: 10px 10px 25px rgba(0,0,0,0.9);
}

body.dark-mode .rt-receipt {
    background-color: #d1d1d1;
    box-shadow: 8px 8px 20px rgba(0,0,0,0.8);
}




/* Force the white Apple logo on the dark Night Life background */
.nightlife-theme .apple-logo-light { display: none !important; }
.nightlife-theme .apple-logo-dark { display: inline-block !important; }
/* ========================================= */
/* GLOBAL MOBILE RESPONSIVENESS              */
/* ========================================= */

