/* ==========================================================================
   WALTER MIKE SYSTEM - MASTER STYLESHEET
   Version: 6.0 (Organized)
   ========================================================================== */

/* --- TABLE OF CONTENTS ---
   1.  VARIABLES & RESET ..... Core colors, fonts, and base settings
   2.  TYPOGRAPHY ............ Font families and text utilities
   3.  HEADER & NAV .......... Top bar, navigation, and mobile toggle
   4.  MOBILE DRAWER ......... The slide-out menu logic
   5.  LAYOUT & CONTAINERS ... Page structure, grids, and cards
   6.  COMPONENTS ............ Buttons, Inputs, Toasts, Modals
   7.  INTERACTIVE TOOLS ..... The Void, Flip Cards, Stats Dashboard
   8.  PAGE SPECIFICS ........ Tattoos, Music, Schedule Generator
   9.  FOOTER ................ Social links and copyright
   ========================================================================== */


/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    /* Theme Colors */
    --bg-color: #18181b;
    --text-color: #f0f0f0;
    --purple-accent: #8a2be2;
    --dark-purple: #4b0082;
    --yellow-accent: #ffd700;
    --green-success: #16a34a;
    --green-hover: #15803d;
    --red-danger: #dc2626;
    --red-hover: #b91c1c;
    --discord-blue: #5865F2;
    --glow-color: #9370db;

    /* Dimensions */
    --header-height: 70px;

    /* Fonts */
    --font-heading: 'Oswald', sans-serif;
    --font-ui: 'Orbitron', sans-serif;
    --font-body: 'Lora', serif;
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: var(--header-height); 
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-ui);
    margin: 0;
    padding-top: var(--header-height);
}


/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-ui); }

.font-oswald { font-family: var(--font-heading); text-transform: uppercase; }
.font-orbitron { font-family: var(--font-ui); }
.font-lora { font-family: var(--font-body); }

.text-hero {
    font-family: var(--font-heading);
    color: var(--purple-accent);
    -webkit-text-stroke: 1px var(--yellow-accent);
    text-shadow: 3px 3px 0 #000;
    text-transform: uppercase;
}

.text-accent { color: var(--yellow-accent); }
.text-muted { color: #888; }

a { color: var(--purple-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--yellow-accent); }


/* ==========================================================================
   3. HEADER & NAV
   ========================================================================== */
.header {
    background-color: rgba(20, 20, 20, 0.95);
    border-bottom: 2px solid var(--purple-accent);
    height: var(--header-height); padding: 0 20px;
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000; backdrop-filter: blur(10px); box-sizing: border-box;
    display: grid; grid-template-columns: 1fr auto 1fr; 
    align-items: center; gap: 10px;
}

.header-left { display: flex; align-items: center; gap: 15px; justify-self: start; }
.header-brand {
    font-family: var(--font-heading);
    font-size: 2.1em;
    color: var(--purple-accent);
    -webkit-text-stroke: 0.5px var(--yellow-accent);
    text-shadow: 2px 2px 0 #000;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

/* Rec Badge (Live Indicator) */
#rec-badge {
    display: none; align-items: center; gap: 6px;
    background-color: rgba(220, 38, 38, 0.1); border: 1px solid var(--red-danger);
    padding: 4px 10px; border-radius: 4px; color: var(--red-danger);
    font-family: var(--font-ui); font-size: 0.8em; font-weight: bold;
    animation: pulse-rec 2s infinite;
}
.rec-dot { width: 8px; height: 8px; background-color: var(--red-danger); border-radius: 50%; }
@keyframes pulse-rec { 0% {opacity: 1;} 50% {opacity: 0.5;} 100% {opacity: 1;} }

.header-center { display: flex; justify-content: center; gap: 30px; justify-self: center; }
.nav-link {
    font-family: var(--font-ui); font-size: 1.1em; font-weight: bold; 
    color: #ccc; text-decoration: none; transition: color 0.2s;
    text-transform: uppercase; letter-spacing: 1px;
}
.nav-link:hover { color: var(--yellow-accent); text-shadow: 0 0 8px var(--purple-accent); }

.header-right { display: flex; align-items: center; gap: 15px; justify-self: end; }
.icon-btn {
    color: #ccc; font-size: 1.4em; transition: transform 0.2s, color 0.2s;
    cursor: pointer; text-decoration: none; position: relative;
    display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 0;
}
.icon-btn:hover { color: var(--yellow-accent); transform: scale(1.1); }
.logout-trigger:hover { color: var(--red-danger) !important; }

/* Admin Shortcuts */
.admin-shortcut {
    font-family: var(--font-ui); font-size: 0.9em; font-weight: bold;
    text-decoration: none; padding: 5px 10px; border-radius: 4px; display: none; 
}
.btn-manage { color: var(--yellow-accent); border: 1px solid var(--yellow-accent); font-size: 0.8em; }
.btn-manage:hover { background: rgba(255, 215, 0, 0.1); }
.btn-record { 
    color: white; background: var(--red-danger); border: 1px solid var(--red-hover);
    display: flex; align-items: center; gap: 5px; font-size: 0.8em;
}
.btn-record:hover { background: var(--red-hover); }

/* Mobile Toggle */
.mobile-toggle { display: none; font-size: 1.8em; background: none; border: none; color: white; cursor: pointer; }

@media (max-width: 1100px) {
    .header { grid-template-columns: 1fr auto; }
    .header-center, .header-right { display: none; }
    .mobile-toggle { display: block; }
    .header-brand { font-size: 1.6em; }
}
@media (min-width: 992px) {
    .header-brand { font-size: 2.5em; }
}


/* ==========================================================================
   4. MOBILE DRAWER
   ========================================================================== */
.mobile-drawer {
    position: fixed; top: 70px; left: 0; width: 100%;
    background: rgba(15, 15, 15, 0.98); border-bottom: 2px solid var(--purple-accent);
    flex-direction: column; align-items: center; padding: 30px 0; gap: 20px; z-index: 999;
    overflow-y: auto; max-height: calc(100vh - 70px);
    
    /* Animation Props */
    display: flex;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.mobile-drawer.active { 
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.mobile-link { font-size: 1.4em; color: white; text-decoration: none; font-family: var(--font-heading); }
.mobile-divider { width: 50%; height: 1px; background: #333; margin: 10px 0; }


/* ==========================================================================
   5. LAYOUT & CONTAINERS
   ========================================================================== */
.page-container { 
    min-height: calc(100vh - var(--header-height) - 150px); 
    padding: 20px; padding-top: calc(var(--header-height) + 20px); 
    box-sizing: border-box; width: 100%; margin: 0 auto; max-width: 1200px; 
}

/* Standard Card */
.content-box, .card { 
    background-color: rgba(42, 42, 42, .7); padding: 25px; border-radius: 10px; 
    margin: 2em auto; width: 100%; border: 2px solid var(--dark-purple); 
    backdrop-filter: blur(5px); box-sizing: border-box; 
}

/* Mobile Responsive Overrides */
@media (max-width: 900px) {
    .page-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        overflow-x: hidden;
    }
    .content-box, .card {
        padding: 15px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Force Tables to Scroll */
    .data-table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
    }
}


/* ==========================================================================
   6. COMPONENTS (Buttons, Inputs, Toasts, Modals)
   ========================================================================== */
/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 25px; border-radius: 8px; font-weight: bold; cursor: pointer;
    font-family: var(--font-ui); border: none; transition: transform 0.2s, background-color 0.2s;
    text-decoration: none; font-size: 1em;
}
.btn:hover { transform: scale(1.02); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary { background-color: var(--green-success); color: white; }
.btn-primary:hover { background-color: var(--green-hover); }

.btn-secondary { background-color: var(--purple-accent); color: white; }
.btn-secondary:hover { background-color: var(--glow-color); }

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

.btn-discord { background-color: var(--discord-blue); color: white; }

/* Inputs */
input, select, textarea {
    background: #222; border: 1px solid var(--purple-accent); 
    color: var(--text-color); padding: 12px; border-radius: 8px;
    font-family: var(--font-ui); font-size: 1em; box-sizing: border-box;
    width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--yellow-accent); }

/* Toasts */
#toast-container {
    position: fixed; top: 90px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: rgba(30, 30, 30, 0.95); color: white;
    padding: 15px 25px; border-radius: 8px; border-left: 5px solid #ccc;
    font-family: var(--font-ui); min-width: 250px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: slideIn 0.3s ease-out; cursor: pointer;
}
.toast.success { border-left-color: var(--green-success); }
.toast.error { border-left-color: var(--red-danger); }
.toast.info { border-left-color: var(--discord-blue); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Modals */
.modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.9);
    align-items: center; justify-content: center;
}
.modal.visible { display: flex; }
.modal-content { max-width: 95%; max-height: 95%; display: flex; justify-content: center; align-items: center; }
.modal-content img {
    max-width: 100%; max-height: 90vh; object-fit: contain;
    border: 2px solid var(--purple-accent); border-radius: 8px;
    box-shadow: 0 0 40px var(--glow-color);
}
.close-modal {
    position: fixed; top: 20px; right: 30px; 
    color: rgba(255, 255, 255, 0.7); font-size: 50px; font-weight: 300;
    cursor: pointer; z-index: 2005; transition: color 0.2s, transform 0.2s;
    line-height: 1;
}
.close-modal:hover { color: var(--yellow-accent); transform: scale(1.1); }

/* Emoji Buttons */
[onclick*="triggerEmoji"] {
    background-color: transparent !important;
    border: 1px solid var(--purple-accent) !important;
    color: var(--yellow-accent) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 1.2em !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-bottom: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    width: auto !important;
    box-shadow: none !important;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif !important;
}
[onclick*="triggerEmoji"]:hover {
    background-color: rgba(138, 43, 226, 0.2) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.4) !important;
}
.input-group [onclick*="triggerEmoji"] { padding: 4px 8px !important; font-size: 1em !important; }


/* ==========================================================================
   7. INTERACTIVE TOOLS
   ========================================================================== */
/* The Void Terminal */
#void-terminal { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background-color: rgba(10, 10, 10, 0.95); z-index: 9999; 
    font-family: 'VT323', monospace; font-size: 1.4em; color: #0f0; 
    padding: 40px; box-sizing: border-box; overflow-y: auto; backdrop-filter: blur(5px);
    display: block; transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#void-terminal.active { transform: translateY(0); }
.void-line { margin-bottom: 5px; white-space: pre-wrap; }
.void-input-line { display: flex; margin-top: 10px; }
.void-prompt { color: var(--purple-accent); margin-right: 10px; }
#void-input { 
    background: transparent; border: none; color: #0f0; 
    font-family: 'VT323', monospace; font-size: 1em; 
    flex-grow: 1; outline: none; padding: 0; margin: 0;
    height: 1.2em; line-height: 1.2em; border-radius: 0;
}
.scanline { 
    position: fixed; left: 0; top: 0; width: 100%; height: 100%; 
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2)); 
    background-size: 100% 4px; pointer-events: none; z-index: 10000; 
}

/* 3D Flip Card (Tattoos) */
#flip-modal { perspective: 1000px; }
.flip-card {
    width: 90%; max-width: 600px; height: 80vh;
    position: relative; transform-style: preserve-3d; transition: transform 0.8s;
}
.flip-card.flipped { transform: rotateY(180deg); }
.flip-front, .flip-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; border-radius: 12px;
    display: flex; flex-direction: column;
    background: #111; border: 2px solid var(--purple-accent);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
}
.flip-front img { width: 100%; height: 100%; object-fit: contain; background: #000; border-radius: 10px; }
.flip-back {
    transform: rotateY(180deg); padding: 40px;
    box-sizing: border-box; overflow-y: auto; text-align: left;
}
.flip-action-bar {
    position: absolute; bottom: 20px; left: 0; width: 100%;
    display: flex; justify-content: center; pointer-events: none;
}
.flip-btn {
    pointer-events: auto; background: var(--purple-accent); color: white;
    border: none; padding: 12px 25px; border-radius: 30px;
    font-family: var(--font-heading); font-size: 1.2em;
    cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.2s; display: flex; align-items: center; gap: 10px;
}
.flip-btn:hover { transform: scale(1.05); background: var(--glow-color); }


/* ==========================================================================
   8. PAGE SPECIFICS
   ========================================================================== */
/* Tattoo Gallery */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px; width: 100%;
}
.gallery-item {
    position: relative; overflow: hidden; border-radius: 8px;
    border: 2px solid var(--dark-purple); aspect-ratio: 1 / 1;
    background-color: black; cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.delete-btn {
    position: absolute; top: 5px; right: 5px;
    background-color: rgba(220, 38, 38, 0.9); color: white;
    border: none; border-radius: 50%; width: 30px; height: 30px;
    cursor: pointer; display: none; align-items: center; justify-content: center;
    font-weight: bold; z-index: 10;
}
.gallery-item:hover .delete-btn { display: flex; }

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    border-radius: 8px; width: 100%; height: 100%;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Story Text */
.story-text {
    font-family: var(--font-body); font-size: 1.3em; line-height: 1.9;
    color: rgba(255, 255, 255, 0.85); white-space: pre-wrap; 
    letter-spacing: 0.02em; max-width: 65ch;
}


/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.footer { 
    background-color: rgba(42, 42, 42, .7); padding: 2rem; margin-top: 4rem; 
    text-align: center; border-top: 2px solid var(--purple-accent); 
    backdrop-filter: blur(5px); 
}
.footer-copy { color: #888; font-size: 0.9em; }
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.social-group { min-width: 250px; }
.social-group h3 { font-size: 1.5em; color: var(--yellow-accent); margin-top: 0; cursor: pointer; user-select: none; position: relative; }
.social-group h3::after { content: ' ▼'; font-size: 0.8em; }
.social-group.active h3::after { content: ' ▲'; }
.social-links-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.social-group.active .social-links-content { max-height: 300px; }
.social-links-content a { display: block; margin: 0.5rem 0; font-size: 1.1em; }
