/* --- 1. CUSTOM FONT LOAD --- */
@font-face {
    font-family: 'GabrielWeiss';
    src: url('assets/GabrielWeissFriendsFont.ttf.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --monica-purple: #745A89;
    --frame-yellow: #FFC82C;
    --central-perk-green: #3D604C;
    --friends-red: #E44D26;
    --friends-blue: #0076C0;
    --text-dark: #000; 
    --text-light: #fff;
    --overlay: rgba(0, 0, 0, 0.2); 
    
    /* Chalkboard Menu Colors */
    --board-bg: #2a2a2a; 
    --wood-border: #6b4226; 
    --chalk-dust: rgba(255, 255, 255, 0.2);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--text-dark);
    transition: background-image 0.5s ease-in-out;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* Background Image Classes */
.bg-central-perk { background-image: linear-gradient(var(--overlay), var(--overlay)), url('assets/central_perk_bg.jpg.png'); }
.bg-ross { background-image: linear-gradient(var(--overlay), var(--overlay)), url('assets/ross_paleontology_bg.jpg.png'); }
.bg-monica { background-image: linear-gradient(var(--overlay), var(--overlay)), url('assets/monica_apartment_bg.jpg.png'); }
.bg-phoebe { background-image: linear-gradient(var(--overlay), var(--overlay)), url('assets/phoebe_smelly_cat_bg.jpg.png'); }
.bg-joeychan { background-image: linear-gradient(var(--overlay), var(--overlay)), url('assets/joey_chandler_bg.jpg.png'); }

/* --- TITLE STYLING --- */
.friends-title {
    font-family: 'GabrielWeiss', 'Arial Black', Impact, sans-serif;
    color: white;
    font-size: clamp(4rem, 10vw, 8rem);
    margin: 0;
    text-align: center;
    letter-spacing: 4px;
    -webkit-text-stroke: 1px black;
    text-shadow: 4px 4px 0px black;
}

.dot {
    font-size: 0.8em;
    -webkit-text-stroke: 0px; 
    text-shadow: 3px 3px 0px black; 
    margin: 0 2px;
}
.dot.red { color: var(--friends-red); }
.dot.blue { color: var(--friends-blue); }
.dot.yellow { color: var(--frame-yellow); }

.tagline {
    color: white;
    margin: 20px 0 0 0;
    font-weight: 900;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    text-shadow: 3px 3px 6px black; 
}

/* Main Layout & Floating Header */
.main-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.main-header {
    background: transparent;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 90;
    pointer-events: none; 
}

.menu-btn {
    background: none;
    border: none;
    color: var(--frame-yellow);
    font-size: 45px;
    cursor: pointer;
    text-shadow: 0 0 8px black; 
    transition: transform 0.2s;
    pointer-events: auto; 
}
.menu-btn:hover { transform: scale(1.1); }

.content-container {
    flex-grow: 1;
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.content-section { display: none; }
.content-section.active {
    display: flex; 
    flex-direction: column;
    animation: fadeIn 0.5s;
    min-height: 100vh;
}

.center-wrapper { margin: auto; width: 100%; padding: 40px 0; }
.home-centered { justify-content: center; min-height: 80vh; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- CHALKBOARD SIDEBAR --- */
.sidebar {
    height: 100%;
    width: 0; 
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    overflow: hidden; 
    transition: 0.5s;
    background-color: var(--board-bg);
    border-right: 18px ridge var(--wood-border);
    box-shadow: inset -5px 0 15px rgba(0,0,0,0.8), 10px 0 25px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column; 
}

.menu-inner-border {
    position: absolute;
    top: 15px; bottom: 15px; left: 15px; right: 15px;
    border: 3px dashed var(--chalk-dust);
    pointer-events: none;
    z-index: 1;
}

.sidebar.open { width: 360px; }

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    padding: 15px 25px 0 0;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.close-btn { background: none; border: none; color: white; font-size: 40px; cursor: pointer; }

.menu-title { text-align: center; position: relative; z-index: 10; margin-top: 10px; flex-shrink: 0; }
.menu-title h2 { font-family: 'Gloria Hallelujah', cursive; color: white; font-size: 3rem; margin: 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.menu-divider { font-size: 2.5rem; margin: 5px 0 20px 0; color: white; }

/* Scrollbar Styles */
.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 10;
    flex-grow: 1;
    overflow-y: auto; 
    padding-bottom: 30px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}
.nav-links::-webkit-scrollbar { width: 8px; }
.nav-links::-webkit-scrollbar-track { background: transparent; }
.nav-links::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.4); border-radius: 10px; }
.nav-links::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.8); }

.nav-links li { margin: 20px 30px; }
.nav-links li a {
    font-family: 'Gloria Hallelujah', cursive;
    text-decoration: none;
    font-size: 1.8rem;
    display: block;
    padding: 10px;
    border-bottom: 2px dotted var(--chalk-dust); 
    transition: 0.3s;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.chalk-pink { color: #ffb6c1 !important; }
.chalk-blue { color: #add8e6 !important; }
.chalk-yellow { color: #fdfd96 !important; }
.chalk-green { color: #90ee90 !important; }
.chalk-orange { color: #ffcc80 !important; }

.nav-links li a:hover, .nav-links li a.active {
    color: white !important;
    text-shadow: 0 0 10px currentColor; 
    transform: scale(1.05) rotate(-2deg);
    border-bottom: 2px solid white;
}

/* --- CARDS --- */
.info-card {
    background: rgba(255, 255, 255, 0.7); 
    padding: 50px;
    border-radius: 12px;
    border: 4px solid var(--central-perk-green);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.info-card p {
    font-size: 1.4rem; 
    line-height: 1.7;
    margin-bottom: 20px;
    color: #000; 
    font-weight: 800; 
    text-shadow: 1px 1px 3px white, -1px -1px 3px white; 
}

h2 {
    font-family: 'Gloria Hallelujah', cursive;
    color: var(--monica-purple);
    font-size: 3.2rem; 
    margin-top: 0;
    text-shadow: 2px 2px 0px white, -1px -1px 0px white; 
}

.friends-quote {
    font-family: 'Gloria Hallelujah', cursive;
    color: var(--friends-red);
    font-size: 1.8rem; 
    font-weight: bold;
    margin: 20px 0;
    line-height: 1.4;
    text-shadow: 2px 2px 0px white;
}

/* --- FORMS --- */
.form-quote {
    background: rgba(255, 255, 255, 0.75);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 5px solid var(--friends-blue);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

form { margin-top: 20px; width: 100%; }

.form-card {
    background: rgba(255, 255, 255, 0.75); 
    padding: 35px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border-left: 6px solid var(--monica-purple);
}

.form-card h2 {
    font-size: 2.6rem; 
    margin-top: 0;
    border-bottom: 3px dashed rgba(0,0,0,0.4); 
    padding-bottom: 15px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 15px;}
.full-width { grid-column: 1 / -1; }

label { font-weight: 900; margin-bottom: 8px; font-size: 1.25rem; color: #000; text-shadow: 1px 1px 2px white; }

input, select, textarea {
    background: #ffffff; 
    padding: 12px;
    border: 2px solid #555;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem; 
    color: #000;
    font-weight: bold;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--monica-purple);
    box-shadow: 0 0 10px rgba(116, 90, 137, 0.8);
}

button { 
    padding: 18px; 
    font-size: 1.4rem; 
    font-weight: 900; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: transform 0.2s, box-shadow 0.2s; 
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}
button:active { transform: scale(0.98); }

.btn-secondary { background-color: var(--frame-yellow); color: var(--text-dark); }
.btn-primary { background-color: var(--central-perk-green); color: var(--text-light); }
.remove-btn { background-color: var(--friends-red); color: white; padding: 10px 15px; font-size: 1rem; float: right; margin-bottom: 10px; box-shadow: none;}

#statusMessage { margin-top: 20px; text-align: center; font-weight: bold; padding: 15px; border-radius: 4px; font-size: 1.3rem; }
.success { background-color: #d4edda; color: #155724; border: 2px solid #c3e6cb;}
.error { background-color: #f8d7da; color: #721c24; border: 2px solid #f5c6cb;}

/* --- SECONDARY CARDS --- */
.card-divider {
    font-family: 'Gloria Hallelujah', cursive;
    color: white;
    text-align: center;
    font-size: 2rem;
    margin: 60px 0 40px 0;
    text-shadow: 2px 2px 0px black;
    border-bottom: 3px dashed rgba(255, 255, 255, 0.5);
    padding-bottom: 20px;
}

.secondary-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.secondary-card { margin-bottom: 0; display: flex; flex-direction: column; justify-content: flex-start; }
.secondary-card h2 { font-size: 2rem; border-bottom: 2px solid rgba(0,0,0,0.2); }
.secondary-card .small-text { font-size: 1.1rem; color: #000; font-weight: bold; margin-top: -5px; margin-bottom: 20px; text-shadow: 1px 1px 2px white; }
.secondary-card button { margin-top: 10px; width: 100%; }

#editStatusMessage, #checkStatusMessage { margin-top: 15px; text-align: center; font-weight: bold; padding: 10px; border-radius: 4px; font-size: 1.1rem; }

/* --- MENU CLICK HINT --- */
.click-here-hint {
    font-family: 'Gloria Hallelujah', cursive;
    color: var(--frame-yellow);
    font-size: 1.8rem;
    font-weight: bold;
    margin-left: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    pointer-events: none; /* So they can click through it */
    animation: pointBounce 1.5s infinite;
}

/* Adds a subtle side-to-side bouncing animation */
@keyframes pointBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); color: white; }
}

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .sidebar.open { width: 100%; } 
    .friends-title { font-size: 3rem; }
    .secondary-actions-grid { grid-template-columns: 1fr; }
}