/* ==========================================================================
   PAWSBURY DISTRICT UNIFIED STYLESHEET (STRICT FIDELITY V3.4)
   A direct, untrimmed merge of all District sub-styles.
   Order: Base > Layout > Components > Map > Gallery
   ========================================================================== */

/* --- 1. BASE.CSS CONTENT --- */
:root {
  --bg-root: #0d0c0b;
  --bg-panel: #1a1816;
  --bg-header: #0a0908;
  --bg-element: #2b2824;
  --bg-input: rgba(0, 0, 0, 0.7);
  --text-primary: #d1c7b7;
  --text-dim: #857e75;
  --text-bright: #f5f0e6;
  --accent-red: #8b3a3a;
  --accent-red-dark: #5a2626;
  --accent-orange: #d4953c;
  --accent-blue: #3d5a80;
  --accent-sage: #708271;
  --accent-gold: #c5a065;
  --status-ok: #50fa7b;
  --status-warn: #ffb86c;
  --status-error: #ff5555;
  --border-color: #38342e;
  --border-glow: 0 0 10px rgba(61, 90, 128, 0.2);
  --shadow-main: 0 10px 40px rgba(0, 0, 0, 0.9);
  --trans-fast: 0.2s ease;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-root);
  color: var(--text-primary);
  font-family: "Verdana", "Geneva", sans-serif;
  margin: 0;
  padding: 0;
  font-size: 11px;
  height: 100vh;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-root);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-element);
  border-radius: 3px;
  border: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange);
}

.app-wrapper {
  width: 96%;
  max-width: 1600px;
  margin: 0 auto;
  background-color: var(--bg-panel);
  box-shadow: var(--shadow-main);
  height: 100vh;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
}

.cypher-btn {
  background: var(--bg-element);
  color: var(--text-bright);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  font-family: "Verdana", sans-serif;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--trans-fast);
}
.cypher-btn:hover {
  background: var(--accent-blue);
  border-color: var(--text-bright);
  box-shadow: var(--border-glow);
}
.cypher-btn:active {
  transform: translateY(1px);
  opacity: 0.8;
}

.loading-text {
  color: var(--text-dim);
  font-style: italic;
  font-size: 10px;
  letter-spacing: 0.5px;
}
.error-view {
  padding: 50px;
  text-align: center;
  color: var(--accent-red);
  border: 1px dashed var(--accent-red);
  margin: 20px;
  background: rgba(139, 58, 58, 0.05);
}

.progress-track {
  width: 100%;
  height: 4px;
  background: var(--bg-root);
  border-radius: 2px;
  overflow: hidden;
  margin: 5px 0 12px 0;
}
.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 1s ease-in-out;
}
.fill-orange {
  background: var(--accent-orange);
  box-shadow: 0 0 5px var(--accent-orange);
}
.fill-blue {
  background: var(--accent-blue);
  box-shadow: 0 0 5px var(--accent-blue);
}

.text-glow {
  text-shadow: 0 0 8px rgba(212, 149, 60, 0.3);
}
.stone-border {
  border: 1px solid var(--border-color);
  background: var(--bg-element);
}
.system-meta {
  font-family: "Courier New", Courier, monospace;
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 10px;
  opacity: 0.6;
}
hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}
.hidden {
  display: none !important;
}
.text-gold {
  color: var(--accent-gold) !important;
}
.text-red {
  color: var(--accent-red) !important;
}
.text-white {
  color: var(--text-primary) !important;
}
.center-text {
  text-align: center;
}
.full-width {
  width: 100%;
}
.mt-10 {
  margin-top: 10px;
}
.no-click {
  pointer-events: none;
}
.clickable {
  cursor: pointer;
}

/* --- 2. LAYOUT.CSS CONTENT --- */
.site-header {
  background: url("/img/header_bg_v1.png") no-repeat center bottom;
  background-size: cover;
  height: 160px;
  flex-shrink: 0;
  position: relative;
  border-bottom: 4px solid var(--bg-header);
  transition:
    height 0.3s ease,
    opacity 0.3s ease;
  z-index: 50;
}
.site-header.collapsed {
  height: 0;
  overflow: hidden;
  border: none;
}
.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 15px 20px;
}

.main-nav {
  background: var(--bg-element);
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--bg-root);
  z-index: 100;
}

#toggle-sidebar,
#toggle-header {
  width: 45px;
  height: 100%;
  font-size: 16px;
  border: none;
  background: var(--bg-header) !important;
  color: var(--accent-blue) !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans-fast);
}
#toggle-sidebar {
  border-right: 1px solid var(--border-color);
}
#toggle-header {
  border-left: 1px solid var(--border-color);
  order: 10;
}
#toggle-sidebar:hover,
#toggle-header:hover {
  background: var(--bg-element) !important;
  color: var(--text-bright) !important;
}

/* ==========================================================================
   CENTRAL NAVIGATION OVERLAY (REFINED)
   ========================================================================== */

/* ==========================================================================
   MODERN DISTRICT DIRECTORY (OVERLAY)
   ========================================================================== */

#nav-links-wrapper {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7); /* Dim background */
  backdrop-filter: blur(12px); /* Blur the street map */
  z-index: 99999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#nav-links-wrapper.nav-overlay-active {
  display: flex !important;
}

/* The contained modal box */
#nav-links-list {
  list-style: none;
  padding: 20px;
  margin: 0;
  width: 100%;
  max-width: 450px; /* Modern width */
  max-height: 80vh; /* Prevents going off screen */
  overflow-y: auto; /* Scrollable if the list gets long */
  background: var(--bg-panel);
  border: 1px solid var(--accent-gold);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

#nav-links-list .nav-item {
  font-family: "Verdana", sans-serif;
  font-size: 1rem; /* More user-friendly size */
  color: var(--text-dim);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 15px;
  transition: all 0.2s ease;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#nav-links-list .nav-item:last-child {
  border-bottom: none;
}

#nav-links-list .nav-item:hover {
  color: var(--accent-gold);
  background: rgba(197, 160, 101, 0.1); /* Subtle highlight */
  transform: translateX(5px);
}

/* Overlay Header */
#nav-links-wrapper::before {
  content: "PAWSBURY DIRECTORY";
  position: absolute;
  top: 5vh;
  font-family: "Courier New", monospace;
  color: var(--accent-gold);
  font-size: 0.8rem;
  letter-spacing: 8px;
  opacity: 0.6;
}
.nav-item {
  background: var(--bg-panel);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  font-weight: bold;
  border: 1px solid var(--border-color);
  white-space: nowrap;
  transition: var(--trans-fast);
  font-size: 10px;
  text-transform: uppercase;
}
.nav-item:hover {
  background: var(--bg-element);
  color: var(--text-bright);
  border-color: var(--accent-blue);
}

.main-content-area {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-root);
}
.sidebar {
  width: 240px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  z-index: 40;
  transition:
    width 0.4s cubic-bezier(0.075, 0.82, 0.165, 1),
    opacity 0.2s ease;
  padding: 15px;
}
.sidebar.collapsed {
  width: 0;
  border: none;
  opacity: 0;
  pointer-events: none;
  padding: 0;
}
.canvas {
  flex-grow: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
#page-content {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  padding: 30px;
  overflow: auto;
  background: radial-gradient(
    circle at center,
    #1a1a1c 0%,
    var(--bg-root) 100%
  );
}

#page-content h1,
#page-content h2 {
  color: var(--text-bright);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  font-family: "Georgia", serif;
  letter-spacing: -0.5px;
}
#page-content h1 {
  font-size: 2.2rem;
}

.interior-view {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
}
.node-title {
  color: var(--text-bright);
  font-size: 2.5rem;
  margin-bottom: 8px;
  font-family: "Georgia", serif;
}
.node-badge {
  background: var(--accent-blue);
  color: #fff;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: bold;
  border-radius: 1px;
  text-transform: uppercase;
}
.directory-container {
  margin-top: 20px;
  padding: 10px;
  border-top: 1px solid #333;
}
.resident-list-scroller {
  max-height: 150px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  padding: 5px;
}
.directory-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  cursor: pointer;
  border-bottom: 1px solid #222;
  font-size: 0.85em;
  transition: 0.2s;
}
.directory-item:hover {
  background: rgba(76, 201, 240, 0.1);
  color: #4cc9f0;
}
.dir-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #444;
}
.dir-plot {
  opacity: 0.5;
  font-size: 0.8em;
  margin-left: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-right: 15px;
  margin-left: auto;
}
.action-icon {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
}
.action-icon:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .main-nav {
    padding: 0 10px;
    justify-content: space-between;
  }
  .nav-links-wrapper {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100vw;
    background: rgba(12, 12, 14, 0.98);
    z-index: 9999;
  }
  .nav-actions {
    gap: 10px;
    margin-right: 5px;
  }
  .action-icon {
    font-size: 1.2rem;
    padding: 5px;
  }
  .sidebar {
    position: absolute;
    height: 100%;
    z-index: 999;
  }
  .sidebar.collapsed {
    display: none;
  }
  .nav-links-wrapper.mobile-open {
    display: block !important;
  }
}
/* =========================================
   FURSTREET GATE (MIDNIGHT EDITION - HYPE V2)
   Theme: Dark Industrial 1920s + Live Activity
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Montserrat:wght@700&display=swap');


/* MAIN CONTAINER - The World Background */
/* MAIN CONTAINER - The Stage */
.gate-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative; /* Anchor for the image */
    overflow: hidden;   /* Clip the zooming image */
    font-family: 'Lato', sans-serif;
    /* No background here, it moves to ::before */
}

/* THE BREATHING IMAGE LAYER */
.gate-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    
    /* The Image */
    background: url('/img/landingpage.jpg') no-repeat center center;
    background-size: cover;
    
    /* The Animation */
    animation: kenburns 40s ease-in-out infinite alternate;
    z-index: 0; /* Behind everything */
}

/* Ensure content sits above the image */
.gate-visual, .gate-panel {
    z-index: 1; 
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); } /* Slow zoom in */
}

/* LEFT SIDE: VISUALS & ATMOSPHERE */
.gate-visual {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    background: transparent; /* Totally clear */
    /* Remove the border-right if you want a seamless look, or keep it for structure */
    border-right: 1px solid rgba(197, 160, 89, 0.1); 
    z-index: 1;
}

/* IMPORTANT: Kill the old ::before pseudo-element if it exists */
.gate-visual::before {
    display: none;
}


@keyframes kenburns { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }

/* RIGHT SIDE: THE PANEL */
.gate-panel {
    width: 450px;
    background: linear-gradient(
        135deg, 
        rgba(20, 20, 20, 0.6) 0%,   /* 60% opacity at top */
        rgba(10, 10, 10, 0.75) 100% /* 75% opacity at bottom */
    );
    
    backdrop-filter: blur(8px); /* Blurs the background so text is readable */
    -webkit-backdrop-filter: blur(8px);
    
    border-left: 1px solid rgba(197, 160, 101, 0.3); /* Keep the gold border */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    box-shadow: -10px 0 50px rgba(0,0,0,0.8);
    position: relative;
    border-left: 1px solid #222;
}

/* TYPOGRAPHY */
.gate-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 20px;
    filter: none !important; /* Forces all children to drop filters */
}
.gate-title {
    font-family: 'Lilita One', cursive; /* Matches the Logo style */
    font-size: 3rem; 
    color: var(--accent-gold);
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.gate-subtitle { font-family: 'Montserrat', sans-serif; font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 4px; margin-top: 5px; }
.gate-quote { font-family: 'Montserrat', serif; font-size: 2rem; font-style: italic; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); max-width: 80%; }

/* INPUTS & BUTTONS */
.auth-form { display: flex; flex-direction: column; gap: 15px; }

.gate-input {
    width: 100%; padding: 14px 15px;
    border: 1px solid #333; background: #000;
    border-radius: 4px; font-family: 'Lato', sans-serif;
    color: #fff; transition: all 0.3s ease;
}
.gate-input:focus {
    border-color: var(--accent-gold);
    outline: none;
    box-shadow: 0 0 10px rgba(197, 160, 101, 0.1);
}

.btn-gate-primary {
    background: var(--accent-gold);
    color: #000;
    border: none;
    padding: 15px;
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}
.btn-gate-primary:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.btn-gate-secondary {
    background: transparent;
    color: #666;
    border: 1px dashed #444;
    padding: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-gate-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* =========================================
   LEGAL FOOTER (The Shield & The Engine)
   ========================================= */
.gate-footer {
    margin-top: auto;
    text-align: center;
    border-top: 1px solid rgba(197, 160, 101, 0.2); /* Subtle Gold Line */
    padding-top: 20px;
    padding-bottom: 15px;
    font-family: 'Lato', sans-serif;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gate-footer a { color: var(--text-dim); text-decoration: none; }

/* BRANDING STACK */
.footer-branding {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.75rem;
}

.brand-line strong {
    color: var(--accent-gold);
    letter-spacing: 0.5px;
}

/* CYPHER SIGNATURE LINE */
.cypher-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between text and coin */
    font-size: 0.7rem;
    color: #555;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.cypher-line:hover {
    opacity: 1;
}

.cypher-tag {
    font-family: 'Courier New', monospace;
    color: #a0a0a0;
    font-weight: bold;
}

/* THE COIN */
.cypher-coin {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.2)); /* Tiny gold glow */
    transition: transform 0.3s ease;
}
.cypher-line:hover .cypher-coin {
    transform: rotate(20deg) scale(1.1); /* Interactive Spin */
}

/* LINKS ROW */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.footer-links a {
    color: #888;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: var(--accent-gold);
}
.footer-links .dot {
    color: #333;
    font-size: 0.6rem;
}

/* FINE PRINT */
.footer-legal-fineprint {
    font-size: 0.6rem;
    color: #444;
    line-height: 1.4;
}
.footer-legal-fineprint a {
    color: #666;
    text-decoration: underline;
}
.footer-legal-fineprint a:hover { color: #999; }


/* HYPE ELEMENTS (Live Badge, Ticker, Ghosts) */
.live-badge {
    /* Glass Effect */
 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    
    border: 1px solid var(--accent-gold);
  
    padding: 8px 16px;
    border-radius: 30px; /* Pill shape */
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: fit-content; /* Don't stretch */
}
.live-dot {
    width: 8px; height: 8px;
    background: #38ac38;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff00;
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0% { opacity: 0.5; }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.5; }
}

.gate-stats {
    display: flex; gap: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(197, 160, 101, 0.3);
    padding-top: 20px;
}
.stat-num { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--accent-gold); line-height: 1; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; color: #666; margin-top: 5px; }

.gate-ticker-wrap {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.9);
    border-top: 1px solid var(--accent-gold);
    height: 40px; overflow: hidden;
    display: flex; align-items: center;
    color: #ccc; font-family: 'Courier New', monospace; font-size: 0.8rem;
}
.gate-ticker-move {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 40s linear infinite;
}
@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

.ghost-toast {
    position: absolute; top: 20px; right: 20px;
    background: rgba(0,0,0,0.8);
    border-left: 3px solid var(--accent-gold);
    color: #fff; padding: 12px 20px;
    font-size: 0.9rem; border-radius: 4px;
    opacity: 0; transform: translateY(-20px);
    transition: all 0.5s ease;
    backdrop-filter: blur(5px);
    display: flex; align-items: center; gap: 10px;
}
.ghost-toast.show { opacity: 1; transform: translateY(0); }

/* =========================================
   MOBILE IMMERSION (Glass & Background)
   ========================================= */
@media (max-width: 768px) {
    
    /* 1. Make the Container the Image */
    .gate-container {
display: flex;
    height: 100vh;
    width: 100vw;
    /* The image spans the FULL screen */
    background: url('/img/landingpage.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Lato', sans-serif;
    overflow: hidden;
}

    /* 2. Hide the Desktop Visual Block (Redundant now) */
    .gate-visual {
        display: none !important;
    }

    /* 3. Make the Panel Translucent (See-through) */
.gate-panel {
    width: 480px; /* Fixed width for the form */
    
    /* THE GLASS EFFECT */
    /* Dark Charcoal with a hint of Gold, at 85% opacity */
    background: linear-gradient(
        160deg, 
        rgba(30, 30, 35, 0.90) 0%, 
        rgba(20, 18, 15, 0.98) 100%
    );
    
    /* This blurs the street lights BEHIND the panel */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Safari support */
    
    /* A subtle inner glow to make the glass pop */
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.05), 
                -20px 0 50px rgba(0,0,0,0.5);
    
    border-left: 1px solid rgba(197, 160, 101, 0.3); /* The Gold Divider */
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px;
    position: relative;
    z-index: 2;
}

    /* 4. Adjust Text for Mobile */
    .gate-title { font-size: 2.2rem; }
    .gate-quote { display: none; } /* Hide quote on mobile to save space */
    
    /* 5. Mobile Footer Fix */
    .gate-footer {
        position: absolute;
        bottom: 20px;
        width: 100%;
        left: 0;
        border-top: none;
    }
}

.gate-quote {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-style: italic;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    
    /* Subtle Glass Box for Readability */
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    padding: 20px;
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 8px 8px 0;
    
    max-width: 80%;
    margin-bottom: auto; /* Pushes it up */
}

.gate-stats {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    
    /* Glass Bar container */
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 160, 101, 0.3);
    border-radius: 8px;
    padding: 15px 25px;
    
    width: fit-content; /* Hug the content */
}


/* Typography & Elements */
.gate-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--gate-gold);
    padding-bottom: 20px;
}

.gate-logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    
    /* THE FIX: Turn the green/red cartoon into a classy Gold Stamp */
    filter: sepia(100%) hue-rotate(10deg) brightness(0.9) contrast(1.2) drop-shadow(0 4px 6px rgba(0,0,0,0.5)) !important;
    opacity: 0.9;
}

.gate-title {
    font-family: '', serif;
    font-size: 2.2rem;
    color: var(--gate-text);
    margin: 0;
    letter-spacing: 1px;
}

.gate-subtitle {
    font-size: 0.9rem;
    color: #828a1d;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

/* The Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gate-input-group {
    position: relative;
}

.gate-input {
    width: 100%;
    padding: 14px 15px;
    
    /* Dark see-through background instead of white */
    background: rgba(0, 0, 0, 0.5); 
    
    /* Gold Border */
    border: 1px solid rgba(197, 160, 101, 0.5);
    border-radius: 4px;
    
    /* Text Settings */
    font-family: 'Lato', sans-serif;
    color: #fff; /* White text when typing */
    transition: all 0.3s ease;
}

.gate-input::placeholder {
    color: rgba(255, 255, 255, 0.5); /* Dim placeholder text */
}

.gate-input:focus {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--accent-gold);
    outline: none;
    box-shadow: 0 0 15px rgba(197, 160, 101, 0.2);
}

/* Buttons */
.btn-gate-primary {
    background: var(--gate-text);
    color: var(--gate-gold);
    border: 1px solid var(--gate-text);
    padding: 14px;
    font-family: 'Playfair Display', serif;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-gate-primary:hover {
    background: var(--gate-gold);
    color: var(--gate-text);
    border-color: var(--gate-gold);
}

.btn-gate-secondary {
    background: transparent;
    color: #666;
    border: 1px dashed #ccc;
    padding: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-gate-secondary:hover {
    border-color: var(--gate-text);
    color: var(--gate-text);
}

/* =========================================
   LEGAL FOOTER (The Shield)
   ========================================= */
.gate-footer {
    margin-top: auto;
    text-align: center;
    border-top: 1px solid rgba(197, 160, 101, 0.2); /* Subtle Gold Line */
    padding-top: 20px;
    padding-bottom: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 0.7rem;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Row 1: Branding */
.footer-branding {
    color: #888;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.footer-branding strong {
    color: var(--accent-gold);
}
.cypher-tag {
    font-family: 'Courier New', monospace;
    color: #a0a0a0;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}
.separator { margin: 0 8px; color: #444; }

/* Row 2: The Links */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.footer-links a {
    color: #aaa;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 1px;
    transition: color 0.2s ease;
    border-bottom: 1px dotted transparent;
}
.footer-links a:hover {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

/* Row 3: Fine Print */
.footer-legal-fineprint {
    font-size: 0.6rem;
    color: #ddd2d2;
    line-height: 1.4;
    margin-top: 5px;
}
.footer-legal-fineprint a {
    color: #555;
    text-decoration: underline;
}
.footer-legal-fineprint a:hover { color: #888; }

/* --- 3. COMPONENTS.CSS CONTENT --- */
.furboard-container {
  position: absolute;
  top: 20px;
  left: 20px;
  pointer-events: auto;
  z-index: 150;
}
.furboard-label {
  display: inline-block;
  background: var(--bg-element);
  color: var(--accent-orange);
  padding: 4px 10px;
  border-radius: 2px;
  font-weight: bold;
  font-size: 10px;
  border: 1px solid var(--border-color);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.furboard-ticker {
  background: var(--bg-input);
  padding: 10px 15px;
  border-radius: 2px;
  color: var(--text-primary);
  font-style: italic;
  max-width: 450px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid var(--accent-orange);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: var(--trans-fast);
}
.furboard-ticker:has(.ticker-radio) {
  border-left: 3px solid #d459ab;
  background: linear-gradient(to right, rgba(212, 89, 171, 0.15), transparent);
  box-shadow: inset 0 0 15px rgba(212, 89, 171, 0.05);
}
.ticker-radio {
  color: #d459ab !important;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(212, 89, 171, 0.6);
  font-family: "Courier New", monospace;
}

.status-panel {
  position: absolute;
  right: 25px;
  top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 150;
  pointer-events: none;
}
.status-panel > * {
  pointer-events: auto;
}
.status-logo img {
  height: 90px;
  opacity: 0.95;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}
.status-logo:hover img {
  transform: scale(1.05) rotate(2deg);
}
.status-text {
  display: flex;
  align-items: center;
  gap: 0;
  height: 32px;
  background: linear-gradient(
    180deg,
    rgba(20, 20, 24, 0.9),
    rgba(8, 8, 10, 0.95)
  );
  border: 1px solid rgba(197, 160, 101, 0.4);
  border-radius: 6px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
#clock-display {
  background: transparent;
  border: none;
  box-shadow: none;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #bbb;
  font-family: "Consolas", monospace;
  min-width: 80px;
}
#system-status {
  width: 300px;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-family: "Consolas", monospace;
  font-size: 11px;
  color: #e0e0e0;
  letter-spacing: 0.5px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  transition:
    opacity 0.5s ease-in-out,
    transform 0.5s ease-in-out;
}
.marquee-wrapper {
  display: inline-block;
  padding-left: 0;
  will-change: transform;
}
.scrolling {
  animation: marquee-scroll 15s linear infinite;
}
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.stat-highlight {
  color: var(--accent-gold, #f4d35e);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(244, 211, 94, 0.25);
  font-size: 1.1em;
}
.stat-dim {
  color: rgba(255, 255, 255, 0.2);
  margin: 0 8px;
  font-weight: 300;
}
.status-fading {
  opacity: 0 !important;
  transform: translateY(2px);
}
.status-radio {
  color: var(--accent-gold, #f4d35e);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(244, 211, 94, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#nav-search-input {
  width: 200px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--accent-gold);
  background: rgba(12, 12, 14, 0.95);
  color: #fff;
  border-radius: 6px;
  font-family: "Consolas", monospace;
  font-size: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 50px;
  right: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#nav-search-input.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.action-icon,
.compass-btn {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ddd;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.compass-btn {
  display: flex; /* Ensure it is visible by default */
  order: -1; /* Keeps it to the left of the nav links if desired */
  flex-shrink: 0;
}
.action-icon:hover,
.action-icon.active {
  background: var(--bg-element);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(197, 160, 101, 0.3);
}

.profile-card {
  text-align: center;
  padding: 25px 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.2));
}
.profile-image-box {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px;
  border-radius: 50%;
  border: 4px solid var(--bg-element);
  box-shadow: 0 0 0 1px var(--border-color);
  overflow: hidden;
  background: #000;
}
.profile-name-tag {
  width: 100%;
  background: var(--accent-blue);
  color: #fff;
  font-weight: bold;
  padding: 10px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 0 #283d57;
  transition: var(--trans-fast);
  text-transform: uppercase;
}
.profile-name-tag:hover {
  transform: translateY(-2px);
  background: #4a6d96;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-header);
  padding: 15px;
  border-radius: 2px;
  margin: 0 15px 20px 15px;
  border: 1px solid var(--border-color);
}
.icon-item {
  font-size: 20px;
  padding: 12px 0;
  display: flex;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: var(--trans-fast);
}
.icon-item:hover {
  color: var(--accent-orange);
  background: var(--bg-element);
}
.counter {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--accent-red);
  color: #fff;
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid var(--bg-header);
  font-weight: bold;
}

.stats-container {
  padding: 0 20px;
  margin-bottom: 25px;
}
.stat-label {
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.progress-track {
  height: 6px;
  background: var(--bg-root);
  border-radius: 3px;
  margin-bottom: 15px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  transition: width 1.2s cubic-bezier(0.1, 0, 0, 1);
}
.fill-orange {
  background: linear-gradient(to right, var(--accent-orange), #ffb86c);
}
.fill-blue {
  background: linear-gradient(to right, var(--accent-blue), var(--accent-sage));
}
.wallet-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  border: 1px solid var(--border-color);
  color: var(--accent-orange);
  font-family: var(--font-mono);
}

.resident-mini-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: var(--bg-element);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  margin-bottom: 10px;
  transition: var(--trans-fast);
}
.resident-mini-card:hover {
  border-color: var(--accent-blue);
  transform: translateX(5px);
}
.resident-info {
  flex-grow: 1;
}
.resident-stats-mini {
  margin: 8px 0;
}
.stat-mini-label {
  font-size: 0.7em;
  opacity: 0.7;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.progress-track.small {
  height: 4px;
  margin-bottom: 6px;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
}
.archive-stamp {
  font-family: var(--font-mono);
  font-weight: bold;
  color: var(--accent-amber);
  border: 2px solid var(--accent-amber);
  padding: 6px 15px;
  text-transform: uppercase;
  transform: rotate(-4deg);
  opacity: 0.8;
  font-size: 12px;
}
.civic-seal {
  text-align: center;
  padding: 30px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  border: 1px dashed var(--accent-blue);
  margin: 20px 0;
}

/* ==========================================================================
   MODERN ZONING MODAL (GLASSMOPHISM)
   ========================================================================== */

/* Full-screen blur backdrop */
#zoning-modal.modal-overlay {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
}

/* Centered Glass Card */
#zoning-modal .modal-content {
  background: var(--bg-panel);
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  max-width: 380px;
  padding: 30px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
}

#zoning-modal h3 {
  font-family: "Georgia", serif;
  font-size: 1.6rem;
  color: var(--text-bright);
  margin-bottom: 5px;
  border-bottom: none;
}

#zoning-coords {
  font-family: "Courier New", monospace;
  color: var(--accent-gold);
  opacity: 0.6;
  font-size: 0.8rem;
  margin-bottom: 25px;
}

/* Modern 2x2 Grid */
.zoning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Sleek Zone Buttons */
.zone-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 20px 10px;
  border-radius: 4px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.zone-btn:hover {
  background: rgba(197, 160, 101, 0.15);
  border-color: var(--accent-gold);
  transform: translateY(-3px);
}

.zone-btn span {
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.zone-btn small {
  color: var(--accent-gold);
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
}

/* Refined Cancel Button */
.cancel-btn {
  margin-top: 20px;
  background: transparent;
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  padding: 12px;
  border-radius: 4px;
  width: 100%;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 2px;
  font-weight: bold;
}

.cancel-btn:hover {
  background: var(--accent-red);
  color: white;
}

.guestbook-section {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 2px solid var(--grid-lines, #222);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
}
.guestbook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-family: "Courier New", serif;
  color: var(--accent-gold, #c5a065);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}
.guestbook-list {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}
.gb-entry {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed #333;
}
.gb-entry:last-child {
  border-bottom: none;
}
.gb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent-slate, #4a5568);
}
.gb-content {
  flex: 1;
  text-align: left;
}
.gb-meta {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.gb-msg {
  font-size: 0.95rem;
  color: var(--text-cream, #e2e2d0);
  font-family: "Georgia", serif;
  font-style: italic;
  line-height: 1.5;
}

#snackbar {
  visibility: hidden;
  min-width: 250px;
  background-color: var(--bg-void, #0f0f10);
  border: 1px solid var(--accent-gold, #c5a065);
  color: #fff;
  text-align: center;
  border-radius: 50px;
  padding: 12px 20px;
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease-in-out;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}
#snackbar.show {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* RADIO PLAYER (Fixed Visibility Logic) */
#radio-player {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 260px;
    
    /* GLASS STYLE */
    background: rgba(20, 20, 24, 0.95);
    border: 1px solid var(--accent-gold);
    border-radius: 12px;
    padding: 15px;
    z-index: 1500;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    display: flex;
    flex-direction: column;
    gap: 10px;
    
    /* HIDDEN STATE (Default) */
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none; /* CANNOT CLICK when hidden */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ACTIVE STATE (Shown via JS) */
#radio-player.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto; /* CLICKABLE only when visible */
}
.radio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.radio-btn {
  background: none;
  border: 1px solid #444;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}
.radio-btn:hover {
  border-color: var(--accent-gold, #c5a065);
  color: var(--accent-gold, #c5a065);
}
.radio-close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #ff4444;
  color: white;
  border: 2px solid #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: transform 0.2s ease;
}
.radio-close-btn:hover {
  transform: scale(1.1);
  background: #ff2222;
}

#nav-controls {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 200;
  display: none; /* FORCED HIDE BY DEFAULT */
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(5px);
}

/* This block ensures it ONLY appears when we explicitly remove the 'is-hidden' class */
#nav-controls:not(.is-hidden) {
  display: flex !important;
}
.d-pad-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.d-pad-row {
  display: flex;
  gap: 5px;
}
.d-pad-btn {
  width: 40px;
  height: 40px;
  background: #222;
  border: 1px solid #555;
  color: var(--accent-gold);
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  user-select: none;
}
.d-pad-btn:active {
  background: var(--accent-gold);
  color: #000;
  transform: scale(0.95);
}

/* --- 4. MAP.CSS CONTENT --- */
#street-grid-container {
  display: grid;
  grid-template-columns: repeat(15, 40px);
  grid-template-rows: repeat(15, 40px);
  gap: 1px;
  justify-content: center;
  margin: 20px auto;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  border: 1px solid #333;
  padding: 2px;
  background: #111;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}
.grid-tile {
  width: 40px;
  height: 40px;
  background-color: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 0px;
  transition: filter 0.1s;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.grid-tile:hover:not(.muted-tile):not(.tile-void) {
  filter: brightness(1.3);
  z-index: 5;
}
.center-tile {
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
  z-index: 10;
  box-sizing: border-box;
}
.tile-void {
  background-color: #050505;
  pointer-events: none;
  background-image: radial-gradient(#1a1a1a 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: 0.5;
}
.tile-grass {
  background: radial-gradient(
    circle at 30% 30%,
    var(--grass-lite),
    var(--grass-deep)
  );
}
.tile-river {
  background: var(--water-deep);
  background-image: repeating-linear-gradient(
    -45deg,
    var(--water-deep) 0px,
    var(--water-deep) 10px,
    var(--water-lite) 10px,
    var(--water-lite) 20px
  );
  background-size: 200% 200%;
  animation: gentleFlow 10s linear infinite;
}
@keyframes gentleFlow {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}
.tile-road {
  background: var(--road-base) !important;
}
.tile-road::before {
  content: "";
  width: 100%;
  height: 100%;
  background-image: radial-gradient(#444 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.3;
  position: absolute;
  top: 0;
  left: 0;
}
.tile-home {
  background: linear-gradient(to bottom, #2d3436, #212529);
  border-bottom: 3px solid var(--accent-slate);
  box-sizing: border-box;
}
.tile-shop {
  background: linear-gradient(to bottom, #3d2b2b, #2b1d1d);
  border-bottom: 3px solid var(--accent-brick);
  box-sizing: border-box;
}
.tile-civic,
.tile-library,
.tile-pub {
  background: #1c1c1e;
  border: 1px solid var(--accent-gold);
  box-shadow: inset 0 0 20px rgba(197, 160, 101, 0.15);
  box-sizing: border-box;
}
.map-hud {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--glass-panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  padding: 10px 18px;
  margin-bottom: 12px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.coords-display h2 {
  font-family: "Georgia", serif;
  font-size: 0.95rem;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
  margin: 0;
  text-transform: uppercase;
}
.quick-card {
  position: fixed;
  width: 280px;
  background: rgba(20, 20, 24, 0.98);
  border: 1px solid var(--accent-gold);
  border-radius: 4px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.9);
  z-index: 2000;
  padding: 15px;
}

/* --- 5. GALLERY.CSS CONTENT --- */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}
.gallery-item {
  background: var(--bg-element, #2b2824);
  border: 1px solid var(--border-color, #38342e);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--trans-fast, 0.2s ease);
  position: relative;
  display: flex;
  flex-direction: column;
}
.gallery-item:hover {
  border-color: var(--accent-sage, #708271);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.gallery-img,
.gallery-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: sepia(25%) contrast(1.05);
  transition: filter 0.3s ease;
}
.gallery-item:hover .gallery-img,
.gallery-item:hover .gallery-thumb {
  filter: sepia(0%) contrast(1.1);
}
.gallery-meta,
.gallery-caption {
  padding: 12px;
  background: var(--bg-header, #0a0908);
  border-top: 1px solid var(--border-color, #38342e);
  flex-grow: 1;
  text-align: left;
}
.img-title {
  display: block;
  color: var(--text-bright, #f5f0e6);
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.img-artist {
  display: block;
  color: var(--accent-sage, #708271);
  font-size: 9px;
  letter-spacing: 1px;
  font-family: monospace;
}

.archive-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px) grayscale(100%);
}
.archive-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  width: 90vw;
  height: 85vh;
  border: 1px solid var(--accent-sage, #708271);
  background: var(--bg-root, #0d0c0b);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}
.archive-viewer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
.archive-viewer img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}
.archive-hud {
  padding: 30px;
  border-left: 1px solid var(--border-color, #38342e);
  background: var(--bg-panel, #1a1816);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  text-align: left;
}
.archive-hud h2 {
  font-family: "Georgia", serif;
  color: var(--text-bright, #f5f0e6);
  font-size: 1.8rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin: 0;
}
.hud-description p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-dim, #857e75);
}

/* --- COMPASS HISTORY & PINNING (RE-INJECTED) --- */
.compass-menu {
  position: fixed;
  top: 210px;
  left: 60px;
  width: 220px;
  background: var(--bg-header);
  border: 1px solid var(--accent-gold);
  border-radius: 4px;
  z-index: 2000;
  box-shadow: var(--shadow-main);
  display: none;
  padding: 10px;
}
.compass-menu.active {
  display: block;
}
.compass-section {
  margin-bottom: 10px;
}
.compass-section-title {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--accent-gold);
  border-bottom: 1px solid #333;
  margin-bottom: 5px;
  padding-bottom: 2px;
  display: flex;
  justify-content: space-between;
}
.compass-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  cursor: pointer;
  border-radius: 2px;
  transition: 0.2s;
}
.compass-item:hover {
  background: var(--bg-element);
}
.pin-icon {
  margin-left: auto;
  color: #555;
  font-size: 12px;
}
.pin-icon.active {
  color: var(--accent-gold);
}

/* --- 6. CRITICAL BUGFIXES (FORCED PRIORITY) --- */
/* Fix: Huge profile picture */
.profile-image-box img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}


/* SECURITY-SAFE UTILITY CLASSES */
.is-hidden {
  display: none !important;
}
.full-width {
  width: 100%;
}
.mt-10 {
  margin-top: 10px;
}
.mt-15 {
  margin-top: 15px;
}
.mt-20 {
  margin-top: 20px;
}
.center-text {
  text-align: center;
}
.opacity-60 {
  opacity: 0.6;
}
.text-white {
  color: #ffffff;
}
.text-gold {
  color: #f4d35e;
}
.border-top-dashed {
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

/* DYNAMIC LAYOUT UTILS */
.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}
.dashed-box {
  border: 1px dashed #00f2ff;
  padding: 15px;
}
.ml-auto {
  margin-left: auto;
}
.font-small {
  font-size: 0.7rem;
}
.mt-40 {
  margin-top: 40px;
}

/* --- MAP POP-UP REPAIRS --- */
.quick-card {
  position: fixed; /* Was absolute, fixed is better for viewport */
  background: rgba(10, 15, 20, 0.95);
  border: 1px solid #00f2ff;
  border-radius: 8px;
  padding: 15px;
  width: 280px;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
  z-index: 1000;
  backdrop-filter: blur(5px);
  display: none; /* Controlled by is-hidden class now */
}

/* Ensure the card shows up when the class is removed */
.quick-card:not(.is-hidden) {
  display: block !important;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.qc-icon {
  font-size: 2rem;
  margin-right: 10px;
}
.qc-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}
.qc-info span {
  font-size: 0.8rem;
  color: #00f2ff;
}

.card-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-family: "Courier New", monospace;
  color: #f4d35e;
}

.card-actions {
  display: flex;
  gap: 10px;
}

/* --- PAWSBURY UI REPAIRS (NO CYAN ALLOWED) --- */

/* 1. Map Pop-up (Quick Card) - Fixed & Gold */
.quick-card {
  position: fixed;
  background: rgba(20, 15, 10, 0.95); /* Dark Warm Brown */
  border: 1px solid #f4d35e; /* PAWSBURY GOLD */
  border-radius: 4px; /* Less rounded, more classic */
  padding: 15px;
  width: 280px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 2000; /* Ensure it floats above map */
  backdrop-filter: blur(5px);
  display: none;
  color: #e0e0e0;
}

/* Force display when 'is-hidden' is removed */
.quick-card:not(.is-hidden) {
  display: block !important;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(244, 211, 94, 0.3); /* Gold Dash */
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.qc-icon {
  font-size: 1.5rem;
  margin-right: 10px;
}
.qc-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #f4d35e;
  font-family: serif;
}
.qc-info span {
  font-size: 0.8rem;
  color: #aaa;
}
.qc-close {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 1.2rem;
}

.card-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-family: monospace;
  color: #fff;
}

.card-actions {
  display: flex;
  gap: 10px;
}

/* 2. Owner Controls (Interior View) - Gold Dashed */
.dashed-box {
  border: 1px dashed #f4d35e;
  padding: 15px;
  background: rgba(244, 211, 94, 0.05);
}

/* 3. Utility Classes */
.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.mt-40 {
  margin-top: 40px;
}
.ml-auto {
  margin-left: auto;
}

/* --- COMPASS NAVIGATION OVERLAY --- */
.nav-links-wrapper.nav-overlay-active {
  display: flex !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 5, 0, 0.98); /* Deep Pawsbury Night */
  z-index: 3000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nav-close-x {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 2px solid #f4d35e;
  color: #f4d35e;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* Only show in mobile/overlay mode */
}

.nav-overlay-active .nav-close-x {
  display: block;
}

.nav-overlay-active .nav-list {
  font-size: 1.5rem;
  text-align: center;
}

/* =========================================
   ZONING MODAL STYLES (Added by Cypher)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 2000; /* Above everything */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-hidden {
    opacity: 0;
    pointer-events: none; /* Allows clicking through when hidden */
    display: none; /* Hard hide to prevent focus issues */
}

.modal-window {
    background: #1a1a1a;
    border: 1px solid var(--accent-color, #00fff2);
    box-shadow: 0 0 20px rgba(0, 255, 242, 0.2);
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.modal-body {
    padding: 20px;
    text-align: center;
}

.zoning-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.zoning-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    gap: 5px;
    background: #252525;
}

.zoning-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.z-icon { font-size: 1.5rem; }
.z-label { font-weight: bold; font-size: 0.9rem; }
.z-price { color: #f4d35e; font-size: 0.8rem; }

.coords-badge {
    background: #000;
    color: var(--accent-color, #00fff2);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    display: inline-block;
    margin-top: 5px;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#clock-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 2px;
    color: #f4d35e; /* Gold to match the theme */
    text-shadow: 0 0 5px rgba(244, 211, 94, 0.4);
}

/* Owner Badge (Tiny User Icon) */
.owner-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.7rem;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    padding: 2px;
    line-height: 1;
    border: 1px solid #d4af37; /* Gold Border */
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
/* Ensure the main icon is centered */
.b-icon {
    font-size: 1.8rem;
    display: block;
    transform: translateY(-2px); /* Slight lift */
}

/* =========================================
   PAWSBURY HYPE UPGRADE (The Buzz)
   ========================================= */



@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 255, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

/* THE STATS GRID (Social Proof) */
.gate-stats {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.7);
    padding-top: 20px;
}

.stat-box {
    text-align: left;
}

.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--gate-gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* THE NEWS TICKER (FOMO Generator) */
.gate-ticker-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.8);
    border-top: 1px solid var(--gate-gold);
    height: 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    white-space: nowrap;
}

.gate-ticker-move {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* CITIZEN OF THE MONTH (Hero Character) */
.hero-char-spot {
    position: absolute;
    bottom: 0;
    right: 20px;
    width: 300px; /* Adjust based on your art */
    height: auto;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(-5px 0 10px rgba(0,0,0,0.5));
}

/* =========================================
   LEGAL MODAL (The Overlay)
   ========================================= */
.legal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85); /* Dim the street */
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.legal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.legal-window {
    width: 90%;
    max-width: 900px;
    height: 80vh;
    background: var(--bg-panel);
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0,0,0,1);
    overflow: hidden;
}

.legal-header-bar {
    background: #000;
    border-bottom: 1px solid #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-title-small {
    color: var(--accent-gold);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 2px;
}

.legal-close-btn {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.legal-close-btn:hover { border-color: var(--accent-red); color: var(--accent-red); }

.legal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR TABS */
.legal-sidebar {
    width: 200px;
    background: #0a0a0a;
    border-right: 1px solid #333;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.legal-tab {
    background: transparent;
    border: none;
    color: #666;
    text-align: left;
    padding: 12px 20px;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.legal-tab:hover { background: #111; color: #fff; }
.legal-tab.active {
    background: #151515;
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
}

/* CONTENT AREA */
.legal-content-area {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: radial-gradient(circle at top right, #1a1a1c, #0d0c0b);
}

.legal-content-area h2 {
    font-family: 'Lilita One', cursive;
    color: #fff;
    font-size: 2rem;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-top: 0;
}

.legal-content-area p { color: #ccc; line-height: 1.6; font-size: 0.95rem; }
.legal-content-area strong { color: var(--accent-gold); }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .legal-body { flex-direction: column; }
    .legal-sidebar { width: 100%; flex-direction: row; overflow-x: auto; height: 50px; border-right: none; border-bottom: 1px solid #333; }
    .legal-tab { white-space: nowrap; padding: 10px; border-left: none; border-bottom: 3px solid transparent; }
    .legal-tab.active { border-left: none; border-bottom-color: var(--accent-gold); }
}

/* ARCHIVE STYLING */
.archives-hero {
    text-align: center;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--accent-gold);
}

.lore-list {
    list-style: none;
    padding: 20px !important;
    background: rgba(197, 160, 101, 0.05) !important;
    border-left: 3px solid var(--accent-gold) !important;
}

.lore-list li {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #f5f0e6 !important;
}

.lore-list li strong {
    color: var(--accent-gold);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Engine Specific Colors */
:root {
    --cyan-glow: #00f2ff;
    --engine-dark: #0a0a0c;
}

.engine-border {
    border: 1px solid var(--cyan-glow) !important;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.15) !important;
}

.engine-header {
    background: linear-gradient(90deg, #111, #1a1a1a) !important;
    border-bottom: 1px solid var(--cyan-glow) !important;
}

.engine-glow {
    color: var(--cyan-glow) !important;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.engine-highlight {
    border-left-color: var(--cyan-glow) !important;
    background: rgba(0, 242, 255, 0.05) !important;
}

.engine-sidebar {
    background: rgba(0, 0, 0, 0.4) !important;
}

.engine-sidebar .legal-tab.active {
    background: var(--cyan-glow) !important;
    color: #000 !important;
}