/* ==========================================================================
   RENZ JOSHUA PEDRO // MAINFRAME TERMINAL - STYLE.CSS
   OPTIMIZATION STATUS: 3.2 PRO (STABLE - VISUAL FX UPDATE)
   ========================================================================== */

:root {
  /* [GUIDE: MASTER COLOR PALETTE] Change these hex codes to alter the entire website's theme globally. */
  --bg-main: #060606;       /* Deepest black for the main background */
  --bg-dark: #161513;       /* Slightly lighter black for contrast blocks */
  --bg-panel: #0d0c0a;      /* Background for cards and popups */
  
  --text-main: #dfdfdf;     /* Primary text color (off-white for readability) */
  --text-muted: #888888;    /* Secondary text color */
  --text-light: #555555;    /* Tertiary text color */
  
  --border-color: #2a2822;  /* Standard border color */
  --border-light: #22201b;  /* Faint border color for subtle dividers */
  
  --cyber-accent: #d4af37;  /* MAIN ACCENT: The Signature Gold */
  --cyber-text: #ffd700;    /* Brighter gold for glowing text */
  --danger-color: #b02a2a;  /* Red for hacking/error events */
}

/* [GUIDE: VARIABLE TRANSITIONS] Allows smooth fading when colors change (e.g., during the red hack event). */
@property --cyber-accent { syntax: '<color>'; inherits: true; initial-value: #d4af37; }
@property --cyber-text { syntax: '<color>'; inherits: true; initial-value: #ffd700; }
@property --bg-panel { syntax: '<color>'; inherits: true; initial-value: #0d0c0a; }
@property --bg-main { syntax: '<color>'; inherits: true; initial-value: #060606; }
@property --bg-dark { syntax: '<color>'; inherits: true; initial-value: #161513; }
@property --border-light { syntax: '<color>'; inherits: true; initial-value: #22201b; }
@property --border-color { syntax: '<color>'; inherits: true; initial-value: #2a2822; }

* { box-sizing: border-box; margin: 0; padding: 0; }

/* [GUIDE: CUSTOM SCROLLBARS] Tweaks the scrollbar to match the terminal aesthetic */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); border-left: 1px solid var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--cyber-accent); border-radius: 4px; border: 2px solid var(--bg-main); }
::-webkit-scrollbar-thumb:hover { background: #ffd700; }
.scroll-custom::-webkit-scrollbar { width: 6px; }
.scroll-custom::-webkit-scrollbar-track { background: var(--bg-dark); border-left: none; }
.scroll-custom::-webkit-scrollbar-thumb { background: var(--cyber-accent); border: none; border-radius: 0; }

/* [GUIDE: BASE BODY SETUP] Prevents text highlighting to feel like a real software terminal */
body { 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    font-family: 'Inter', -apple-system, sans-serif; 
    font-size: 14px; 
    line-height: 1.6; 
    padding: 20px; 
    position: relative; 
    overflow-x: hidden; 
    transition: filter 0.3s ease, opacity 0.3s ease; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    user-select: none; /* Prevents dragging text */
    -webkit-user-select: none;
}

/* [GUIDE: INPUT OVERRIDES] Re-enables text selection specifically for input forms */
input, textarea { user-select: auto !important; -webkit-user-select: auto !important; }

/* [GUIDE: ANTI-DRAG] Prevents clients from dragging your images/videos to their desktop */
img, video { -webkit-user-drag: none; }

/* [NOTE: OPTIMIZED TRANSITIONS] Smoother global easing for primary containers */
.terminal-container, .clean-text-panel, .system-header, .left-strip, .vinyl-disc, .system-video { transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1); }

/* [GUIDE: CUSTOM ALERTS] The small notification box at the top of the screen */
.custom-alert { 
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -40%) scale(0.95); 
    background: var(--bg-panel); color: var(--cyber-accent); padding: 30px 40px; 
    font-weight: bold; border: 2px solid var(--cyber-accent); box-shadow: 0 0 50px rgba(212,175,55,0.4); 
    z-index: 25000; opacity: 0; pointer-events: none; transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
    text-align: center; border-radius: 4px; display: flex; flex-direction: column; align-items: center; gap: 15px; 
}
.custom-alert.show { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.custom-alert-icon { font-size: 36px; animation: pulseLive 1.5s infinite; color: var(--cyber-accent); }

/* [GUIDE: FLATPICKR Z-INDEX] Ensures the calendar pops up OVER the modal window */
.flatpickr-calendar { z-index: 99999 !important; position: fixed !important; }
.flatpickr-time { min-width: 165px; }
.flatpickr-input { position: relative; z-index: auto; }

/* ==========================================================================
   [GUIDE: BREACH EVENT (RED HACK STATE)] 
   Overrides the CSS variables when body.breach-mode is active.
   ========================================================================== */
body.breach-mode { --cyber-accent: #ff003c; --cyber-text: #ff003c; --bg-panel: #1a0000; --bg-main: #140000; --bg-dark: #2a0808; --border-light: #440a0a; --border-color: #660f0f; }
.breach-mode .terminal-container, .breach-mode .onboarding-overlay, .breach-mode .clean-text-panel { box-shadow: 0 0 50px rgba(255,0,60,0.15); }
.breach-overlay-flash { position: fixed; top:0; left:0; width:100vw; height:100vh; background: rgba(255,0,60,0.1); pointer-events: none; z-index: 99990; opacity: 0; visibility: hidden; transition: opacity 2s ease, visibility 2s ease; }
body.breach-mode .breach-overlay-flash { visibility: visible; animation: flashAlarm 2s infinite; }
@keyframes flashAlarm { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.breach-mode .vinyl-disc { background: repeating-radial-gradient(#111, #111 2px, #330000 3px, #330000 4px); border-color: #ff003c; }
body.breach-mode .animated-subtitle::after { background: linear-gradient(90deg, transparent, rgba(255,0,60,0.8), transparent); }

/* [GUIDE: UI LOCKDOWN] Fades out buttons when the system is "hacked" or loading */
.ui-locked { pointer-events: none !important; opacity: 0.4 !important; filter: grayscale(100%) !important; transition: all 0.5s ease !important; }
.forced-open { display: flex !important; }

/* [GUIDE: PERMANENT HACK TEXT] Styling for the corrupted bio text */
#about-title { color: var(--cyber-accent); }
.permanent-hack { color: var(--danger-color) !important; text-shadow: 0 0 5px rgba(176, 42, 42, 0.8), 2px 2px 0px rgba(0,0,0,0.9) !important; font-weight: bold; font-family: 'Consolas', monospace; transition: all 0.3s ease !important; animation: pulseHackText 2s infinite; }
.permanent-hack.terminal-typing::after { color: var(--danger-color) !important; transition: none !important; }
@keyframes pulseHackText { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; text-shadow: 0 0 12px rgba(176, 42, 42, 1), 2px 2px 0px rgba(0,0,0,0.9); } }

.video-glitch-fx { animation: extremeGlitch 0.4s ease-out forwards, pulseHackText 2s infinite !important; border-color: var(--danger-color) !important; box-shadow: 0 0 25px rgba(255, 0, 60, 0.4) !important; }
.extreme-glitch-fx { animation: hardcoreGlitch 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; pointer-events: none; z-index: 999999; }

@keyframes hardcoreGlitch {
    0% { transform: scale(1) skew(0deg); filter: invert(0) brightness(1); opacity: 1; }
    10% { transform: scale(1.05) skew(15deg) translate(-20px, 10px); filter: invert(1) brightness(2) contrast(300%) sepia(100%) hue-rotate(90deg); opacity: 0.8; box-shadow: inset 0 0 100px red; }
    20% { transform: scale(0.95) skew(-15deg) translate(20px, -10px); filter: invert(0) brightness(0.5); opacity: 0.9; }
    30% { transform: scale(1.1) skew(5deg) translate(-10px, -20px); filter: invert(1) brightness(3) hue-rotate(180deg); opacity: 1; }
    40% { transform: scale(0.9) skew(-5deg) translate(10px, 20px); filter: invert(0) brightness(1); opacity: 0.5; }
    50% { transform: scale(1.05) skew(20deg) translate(-30px, 0px); filter: invert(1) brightness(4) sepia(100%); opacity: 0.8; }
    60% { transform: scale(0.95) skew(-20deg) translate(30px, 0px); filter: invert(0) brightness(0.5); opacity: 1; }
    80% { transform: scale(1.02) skew(2deg) translate(-5px, 5px); filter: invert(1) brightness(1.5) sepia(50%) hue-rotate(270deg); opacity: 0.9; }
    100% { transform: scale(1) skew(0deg); filter: invert(0) brightness(1); opacity: 1; }
}

/* [NEW FEATURE: VIDEO TRANSITION FADE] Smooth fade out for the cinematic overlay */
.fade-out-video { animation: fadeOutOverlay 0.8s ease forwards; }
@keyframes fadeOutOverlay { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }

/* [GUIDE: TYPOGRAPHY] */
.friendly-text { font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.8; color: #f0f0f0; transition: color 1s ease; white-space: pre-wrap; }
.mono-text { font-family: 'Consolas', monospace; font-size: 11px; font-weight: bold; transition: color 1s ease; }
.cyber-text { color: var(--cyber-text); text-shadow: 0 0 5px rgba(212, 175, 55, 0.4); transition: color 1s ease, text-shadow 1s ease; }
.desc-text { color: var(--text-muted); font-size: 13px; margin-bottom: 15px; line-height: 1.5; transition: color 1s ease;}
.clean-text-panel { background: var(--bg-panel); padding: 25px; border-radius: 4px; border: 1px solid var(--border-light); box-shadow: 0 10px 30px rgba(0,0,0,0.8); position: relative; z-index: 10001; transition: all 1s ease;}

/* [NOTE: OPTIMIZED ENTRY ANIMATION] Changed from a harsh scale wipe to a cinematic spatial fade */
@keyframes terminalEntry { 
    0% { transform: translateY(20px) scale(0.98); opacity: 0; filter: blur(8px); } 
    100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); } 
}

/* [NOTE: OPTIMIZED SCAN WIPE] Softened the clip-path animation to match premium visual standards */
@keyframes scanWipe { 
    0% { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transform: translateY(10px); opacity: 0; } 
    100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translateY(0); opacity: 1; } 
}

.glitch-transition { animation: extremeGlitch 0.5s ease-out forwards; }
@keyframes extremeGlitch { 0% { transform: scale(1) skewX(0); filter: blur(0) invert(0); opacity: 0.5; } 20% { transform: scale(1.02) skewX(5deg) translate(5px, 5px); filter: blur(2px) invert(1); box-shadow: inset 0 0 50px var(--cyber-accent); } 40% { transform: scale(0.98) skewX(-10deg) translate(-5px, -5px); filter: blur(0) invert(0) sepia(1); } 80% { transform: scale(0.99) skewX(-2deg) translate(2px, 2px); filter: blur(0) invert(1); } 100% { transform: scale(1) skewX(0); filter: blur(0) invert(0); opacity: 1; transform: translate(0,0); } }

/* [GUIDE: REBOOT SCREEN] */
.system-offline-glitch { animation: tvOff 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards !important; background-color: #000 !important; pointer-events: none;}
@keyframes tvOff { 0% { transform: scale(1, 1); filter: brightness(1); } 40% { transform: scale(1, 0.05); filter: brightness(5) contrast(200%); } 80% { transform: scale(0.01, 0.01); filter: brightness(10) blur(2px); } 100% { transform: scale(0, 0); filter: brightness(0); } }

.offline-screen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #000; z-index: 999999; display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards; overflow: hidden; }
.offline-text { font-family: 'Consolas', monospace; font-size: 24px; color: var(--danger-color); letter-spacing: 4px; border-right: 2px solid var(--danger-color); padding-right: 5px; text-shadow: 0 0 10px rgba(176, 42, 42, 0.8); animation: blinkCursor 1s infinite;}
.reboot-sequence { font-family: 'Consolas', monospace; color: var(--text-main); text-align: left; padding: 30px; font-size: 14px; width: 80%; max-width: 600px; line-height: 1.8; background: var(--bg-panel); border: 1px solid var(--cyber-accent); box-shadow: 0 0 30px rgba(212,175,55,0.1); border-radius: 4px; animation: scanWipe 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards; position: relative; z-index: 5;}
.reboot-sequence div { color: var(--text-muted); }
.reboot-sequence div:last-child { color: var(--cyber-accent); }
.reboot-container { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; position: relative; z-index: 5; }

/* [GUIDE: HEADER & IDENTITY] */
.user-name { font-size: 32px; font-weight: 900; text-transform: uppercase; letter-spacing: -0.5px; color: #fff; cursor: crosshair; transition: text-shadow 0.2s; }
.user-name:hover { animation: intenseGlitch 0.3s linear infinite; }
@keyframes intenseGlitch { 0% { text-shadow: 3px 0 var(--cyber-accent), -3px 0 var(--danger-color); transform: translate(1px, -1px); } 20% { text-shadow: -3px 0 var(--cyber-accent), 3px 0 var(--danger-color); transform: translate(-1px, 1px); } 40% { text-shadow: 3px 0 var(--cyber-accent), -3px 0 var(--danger-color); transform: translate(1px, 1px); } 60% { text-shadow: -3px 0 var(--cyber-accent), 3px 0 var(--danger-color); transform: translate(-1px, -1px); } 100% { text-shadow: 0 0 0; transform: translate(0); } }

.user-title { font-size: 18px; font-weight: 700; color: var(--cyber-accent); margin-top: 5px; letter-spacing: 1.5px; transition: color 1s ease; }
.animated-subtitle { position: relative; display: inline-block; overflow: hidden; padding-bottom: 2px; }
.animated-subtitle::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(212,175,55,0.6), transparent); animation: scanLaser 3s infinite; }
@keyframes scanLaser { 100% { left: 200%; } }

.fx-glitch { animation: textGlitch 4s infinite; display: inline-block; color: var(--cyber-accent); font-weight: bold; transition: color 1s ease; }
@keyframes textGlitch { 0%, 100% { opacity: 1; transform: skewX(0) translateX(0); } 10% { opacity: 0.8; transform: skewX(-15deg) translateX(-1px); text-shadow: 2px 0 var(--danger-color), -2px 0 #fff; } 12% { opacity: 1; transform: skewX(10deg) translateX(1px); text-shadow: none; } 14% { transform: skewX(0) translateX(0); } }

.access-denied-seal { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(176, 42, 42, 0.9); color: #fff; display:flex; align-items:center; justify-content:center; font-weight: bold; letter-spacing: 2px; z-index: 10; font-family: 'Consolas', monospace; font-size: 11px;}
.seal-shatter { animation: sealBreak 1s forwards; animation-delay: 0.5s; }
@keyframes sealBreak { 0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); opacity: 1;} 20% { clip-path: polygon(0 0, 45% 0, 55% 100%, 0 100%); transform: translate(-5px, 5px); } 40% { clip-path: polygon(55% 0, 100% 0, 100% 100%, 45% 100%); transform: translate(5px, -5px); } 100% { opacity: 0; transform: scale(1.5); filter: blur(10px); display:none;} }

.terminal-typing::after { content: '█'; animation: blinkCursor 0.8s step-end infinite; margin-left: 4px; color: var(--cyber-accent); }
@keyframes blinkCursor { 50% { opacity: 0; } }

.glow-glitch-fx { position: relative; overflow: hidden; box-shadow: 0 0 10px rgba(212,175,55,0.3); transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); border: 1px solid var(--cyber-accent); }
.glow-glitch-fx:hover { box-shadow: 0 0 25px rgba(212,175,55,0.6); animation: btnGlitch 0.3s infinite; border-color: #ffd700; }
@keyframes btnGlitch { 0% { transform: translate(1px, 1px); filter: contrast(150%); } 50% { transform: translate(-1px, -1px); filter: contrast(100%); } 100% { transform: translate(1px, -1px); } }

/* ==========================================================================
   [GUIDE: SWIPE & CONFIRM BUTTONS] 
   Controls the visual look of the swipe-to-exit bar and the glass confirm button.
   ========================================================================== */
.swipe-exit-wrapper { 
    position: relative; width: 100%; height: 50px; 
    background: linear-gradient(90deg, #050505, #111, #050505); border: 1px solid var(--cyber-accent); 
    border-radius: 4px; box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.1); 
    display: flex; align-items: center; justify-content: center; 
    user-select: none; -webkit-user-select: none;
    overflow: visible; transition: border-color 0.4s, box-shadow 0.4s;
}
.sleek-exit { height: 35px !important; max-width: 250px; border-color: var(--danger-color) !important; box-shadow: inset 0 0 15px rgba(176, 42, 42, 0.2) !important; }
.sleek-exit .swipe-text { color: var(--danger-color) !important; font-size: 11px !important; }
.sleek-exit:hover { box-shadow: inset 0 0 20px rgba(176, 42, 42, 0.4) !important; }

.card-reader-slot {
    position: absolute; top: 50%; left: 10px; right: 10px; height: 6px;
    background: #000; transform: translateY(-50%); border-radius: 3px;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.9), 0 1px 1px rgba(255,255,255,0.05); z-index: 1;
}

.swipe-text { 
    color: var(--cyber-accent); font-family: 'Consolas', monospace; 
    font-size: 13px; font-weight: bold; letter-spacing: 1.5px; 
    z-index: 2; pointer-events: none; user-select: none; 
    animation: pulseLive 2s infinite; 
    background: #050505; padding: 0 10px; border-radius: 2px;
}
.swipe-knob { position: absolute; cursor: grab; z-index: 3; transition: transform 0.1s ease; }
.swipe-knob:active { cursor: grabbing; }

.sleek-knob { left: 5px; top: 1px; width: 45px; height: 31px; background: var(--danger-color); border: 1px solid #ff003c; border-radius: 2px; box-shadow: 2px 2px 10px rgba(0,0,0,0.8); transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease;}
.sleek-knob:active { transform: scale(0.92); box-shadow: inset 0 0 5px rgba(0,0,0,0.9); }

.glass-confirm-container { width: 100%; display: flex; justify-content: center; align-items: center; padding: 10px; }
.futuristic-glass-btn {
    position: relative; overflow: hidden; width: 100%; max-width: 250px; padding: 15px 20px; border-radius: 4px;
    background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.4); box-shadow: 0 0 15px rgba(212, 175, 55, 0.1), inset 0 0 20px rgba(212, 175, 55, 0.05);
    color: #fff; font-family: 'Consolas', monospace; font-size: 14px; font-weight: bold; letter-spacing: 2px;
    cursor: pointer; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); text-shadow: 0 0 5px rgba(212, 175, 55, 0.5); outline: none;
}
.futuristic-glass-btn:hover { background: rgba(212, 175, 55, 0.1); border-color: var(--cyber-accent); box-shadow: 0 0 25px rgba(212, 175, 55, 0.3), inset 0 0 15px rgba(212, 175, 55, 0.2); transform: translateY(-2px); }
.futuristic-glass-btn:active { transform: translateY(1px) scale(0.98); }
.futuristic-glass-btn.processing { pointer-events: none; border-color: #0ff; box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), inset 0 0 20px rgba(0, 255, 255, 0.1); color: #0ff; text-shadow: 0 0 8px #0ff; }
.btn-scan-line { position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); transform: skewX(-20deg); animation: scanGlare 3s infinite; }
@keyframes scanGlare { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }
.btn-loader { position: absolute; bottom: 0; left: 0; height: 3px; background: #0ff; width: 0%; box-shadow: 0 0 10px #0ff; transition: width 0.1s linear, background-color 0.5s ease; }

.gear-locked { opacity: 0 !important; pointer-events: none !important; display: none !important; }

/* [GUIDE: GOOGLE CALENDAR] Inverts colors to fake a dark mode on Google's iFrame */
.gcal-iframe { width: 100%; min-height: 400px; border: 1px solid var(--border-light); border-radius: 4px; background-color: transparent; transition: all 0.5s ease; filter: invert(1) hue-rotate(180deg) contrast(0.9) brightness(0.95); }

.swipe-down-wrapper { width: 40px; height: 110px; background: rgba(212, 175, 55, 0.1); border: 1px solid var(--cyber-accent); border-radius: 20px; display: flex; flex-direction: column; align-items: center; overflow: hidden; user-select: none; transition: border-color 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.4s ease; box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);}
.swipe-down-wrapper:hover { background: rgba(212, 175, 55, 0.15); box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);}
.swipe-down-text { color: var(--cyber-accent); font-family: 'Consolas', monospace; font-size: 10px; font-weight: bold; writing-mode: vertical-rl; transform: rotate(180deg); margin-top: auto; margin-bottom: 12px; pointer-events: none; animation: pulseLive 2s infinite; letter-spacing: 1px;}
.swipe-down-knob { position: absolute; top: 3px; left: 3px; width: 32px; height: 32px; background: var(--cyber-accent); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: grab; transition: background 0.3s, box-shadow 0.3s; box-shadow: 0 0 10px rgba(212, 175, 55, 0.5); }
.swipe-down-knob:active { cursor: grabbing; background: #ffd700; box-shadow: inset 0 0 8px rgba(0,0,0,0.5);}

.tc-window.closing { animation: swipeCardClose 0.45s cubic-bezier(0.5, 0, 0, 1.2) forwards; }
@keyframes swipeCardClose { 0% { transform: translateY(0) scale(1) rotate(0); opacity: 1; } 100% { transform: translateY(120vh) scale(0.85) rotate(-5deg); opacity: 0; } }

.tc-tab-btn { flex: 1; background: transparent; color: var(--text-muted); border: none; border-bottom: 2px solid transparent; padding: 12px; font-family: 'Consolas', monospace; font-size: 11px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; }
.tc-tab-btn:hover { background: rgba(212,175,55,0.05); color: var(--cyber-accent); }
.tc-tab-btn.active { color: var(--cyber-accent); border-bottom: 2px solid var(--cyber-accent); background: rgba(212,175,55,0.1); }
.tc-panel { animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

.drag-node { position: absolute; width: 25px; height: 25px; background: rgba(212,175,55,0.9); color: #000; display: flex; align-items: center; justify-content: center; font-weight: bold; font-family: 'Consolas', monospace; cursor: move; border-radius: 50%; box-shadow: 0 0 10px rgba(212,175,55,0.8); transform: translate(-50%, -50%); user-select: none; z-index: 10; border: 2px solid #fff; transition: background-color 1s ease; pointer-events: auto;}

.terminal-container { display: flex; max-width: 1050px; margin: 0 auto; border: 1px solid var(--cyber-accent); background-color: var(--bg-main); box-shadow: 0 0 30px rgba(212, 175, 55, 0.05); position: relative; z-index: 10; animation: terminalEntry 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards; transform-origin: center center; opacity: 1; transition: all 1s ease; width: 100%;}
.left-strip { width: 30px; background-color: var(--bg-dark); color: var(--cyber-accent); padding: 20px 0; display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--border-light); font-family: 'Consolas', monospace; font-size: 9px; font-weight: bold; transition: all 1s ease;}
.left-strip svg { margin-bottom: 15px; color: var(--cyber-accent); transition: color 1s ease;}
.strip-digits { writing-mode: vertical-rl; text-orientation: mixed; margin: 10px 0; letter-spacing: 2px;}
.strip-symbol, .strip-tag { margin-top: 10px; }
.main-deck { flex: 1; padding: 40px; position: relative; } 

.system-header { margin-bottom: 25px; }
.protocol-header { font-family: 'Consolas', monospace; font-size: 10px; font-weight: bold; color: var(--text-muted); letter-spacing: 1.5px; border-bottom: 1px solid var(--border-light); padding-bottom: 6px; transition: border-color 1s ease;}
.identity-row { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 15px; gap: 20px; flex-wrap: wrap; }
.name-block { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 250px; }

/* [GUIDE: AUDIO PLAYER STYLING] */
.audio-deck { position: relative; display: flex; align-items: center; gap: 18px; background: rgba(255,255,255,0.02); padding: 10px 18px; border: 1px solid var(--border-light); z-index: 9000; border-radius: 4px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); transition: all 1s ease; }
.disc-wrapper { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.vinyl-disc { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--cyber-accent); background: repeating-radial-gradient(#111, #111 2px, #2a2a2a 3px, #2a2a2a 4px); position: relative; overflow: hidden; transition: border-color 1s ease, background 1s ease;}
.vinyl-disc::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(transparent 0deg, rgba(212,175,55,0.15) 45deg, transparent 90deg, transparent 180deg, rgba(212,175,55,0.15) 225deg, transparent 270deg); }
.vinyl-disc::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; background: var(--bg-main); border-radius: 50%; border: 1px solid var(--cyber-accent); transition: all 1s ease;}
.vinyl-disc.spinning { animation: spin 2.5s linear infinite; }
.disc-wrapper.breaking { animation: shatter 0.5s forwards; }
.disc-wrapper.rebuilding { animation: assemble 0.5s forwards; }
@keyframes shatter { 0% { transform: scale(1) rotate(0); opacity: 1; filter: blur(0); } 100% { transform: scale(1.2) rotate(15deg); opacity: 0; filter: blur(4px) contrast(200%); } }
@keyframes assemble { 0% { transform: scale(0.8) rotate(-15deg); opacity: 0; filter: blur(4px); } 100% { transform: scale(1) rotate(0); opacity: 1; filter: blur(0); } }
@keyframes spin { 100% { transform: rotate(360deg); } }

.audio-telemetry { display: flex; flex-direction: column; font-size: 10px; color: var(--text-muted); min-width: 200px; }
.visualizer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; gap: 15px; overflow: hidden; }
.telemetry-stats { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio-visualizer { display: flex; gap: 2px; height: 14px; align-items: flex-end; flex-shrink: 0; }
.vis-bar { width: 3px; background-color: var(--cyber-accent); height: 2px; transition: height 0.05s ease, background-color 1s ease; border-radius: 1px 1px 0 0; }

.track-progress-wrapper { width: 100%; height: 5px; background: rgba(255,255,255,0.05); border: 1px solid var(--border-light); margin: 6px 0; position: relative; border-radius: 2px; transition: border-color 1s ease;}
.track-progress-fill { height: 100%; background: var(--cyber-accent); width: 0%; box-shadow: 0 0 5px var(--cyber-accent); border-radius: 1px; transition: width 0.1s linear, background-color 1s ease, box-shadow 1s ease; }

.audio-controls { display: flex; gap: 8px; margin-top: 6px; }
.control-btn { background: transparent; color: var(--cyber-accent); border: 1px solid var(--cyber-accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 6px 14px; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); border-radius: 2px; }
.control-btn.active-state { background: var(--cyber-accent); color: #000; }
.control-btn:hover { background: var(--cyber-accent); color: #000; box-shadow: 0 0 12px rgba(212, 175, 55, 0.6); transform: scale(1.05);}
.control-btn svg { width: 12px; height: 12px; }

.hud-dropdown { position: absolute; top: calc(100% + 10px); left: 0; width: 360px; background: var(--bg-panel); border: 1px solid var(--border-light); border-left: 3px solid var(--cyber-accent); box-shadow: 5px 5px 15px rgba(0,0,0,0.8); z-index: 9999; display: none; flex-direction: column; transition: all 1s ease;}
.hud-dropdown.active { display: flex; animation: slideDownHUD 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
@keyframes slideDownHUD { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.tab-registry { display: flex; align-items: center; gap: 15px; margin-top: 25px; flex-wrap: wrap; border-bottom: 1px solid var(--border-light); padding-bottom: 2px; transition: border-color 1s ease; justify-content: space-between;}
.tab-link { display: flex; align-items: center; gap: 8px; background: none; border: none; font-family: 'Consolas', monospace; font-size: 12px; font-weight: bold; padding: 12px 20px; cursor: pointer; color: var(--text-muted); transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.tab-link svg { width: 16px; height: 16px; }
.tab-link:hover { color: #fff; transform: translateY(-2px);}
.tab-link.active { color: #000; background-color: var(--cyber-accent); box-shadow: 0 -2px 10px rgba(212,175,55,0.2); }

.secret-gear { margin-left: auto; opacity: 0.2; padding: 12px; border: none !important; background: transparent !important; outline: none !important; box-shadow: none !important; color: var(--cyber-accent); filter: drop-shadow(0 0 5px var(--cyber-accent)); cursor: pointer; transition: opacity 0.4s ease; position: relative; right: 0; }
.secret-gear svg { width: 22px; height: 22px; transform-origin: center center; animation: slowSpin 10s linear infinite; }
.secret-gear:hover { opacity: 1; filter: drop-shadow(0 0 10px var(--cyber-accent)); }
.secret-gear:hover svg { animation: slowSpin 3s linear infinite; }
.secret-gear.active { color: var(--cyber-accent) !important; opacity: 1; filter: drop-shadow(0 0 15px var(--cyber-accent)); }
.secret-gear.active svg { animation: slowSpin 5s linear infinite; }
@keyframes slowSpin { 100% { transform: rotate(360deg); } }

.tab-content { display: none; padding-top: 25px; }
.tab-content.active { display: block; animation: scanWipe 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

.grid-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; align-items: start; }
.scrollable-grid { max-height: 600px; overflow-y: auto; padding-right: 15px; }

.port-tab-btn { background: var(--bg-dark); color: var(--text-muted); }
.port-tab-btn.active { background: var(--cyber-accent); color: #000; }
.port-view { display: block; animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;}

.section-divider-title { position: relative; font-family: 'Consolas', monospace; font-size: 12px; font-weight: bold; background: var(--bg-dark); padding: 8px 12px; border-left: 3px solid var(--cyber-accent); margin-bottom: 20px; color: var(--cyber-accent); letter-spacing: 1px; transition: all 1s ease; overflow: hidden; }

.cyber-divider-particles::before {
    content: ''; position: absolute; top: -50%; left: 0; width: 200%; height: 200%;
    background-image: 
        radial-gradient(1.5px 1.5px at 10px 10px, rgba(212,175,55,0.7) 100%, transparent 100%),
        radial-gradient(1.5px 1.5px at 40px 30px, rgba(212,175,55,0.4) 100%, transparent 100%),
        radial-gradient(1px 1px at 80px 15px, rgba(212,175,55,0.8) 100%, transparent 100%),
        radial-gradient(2px 2px at 120px 25px, rgba(212,175,55,0.3) 100%, transparent 100%);
    background-size: 150px 50px; opacity: 0.8; z-index: 0; pointer-events: none;
    animation: driftParticles 10s linear infinite;
}
@keyframes driftParticles { 0% { transform: translateX(0) translateY(0); } 100% { transform: translateX(-150px) translateY(15px); } }

.action-row { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 30px; }
.nier-btn { display: inline-flex; justify-content: center; align-items: center; gap: 10px; background-color: var(--bg-panel); color: var(--cyber-accent); border: 1px solid var(--cyber-accent); font-family: 'Consolas', monospace; font-size: 12px; font-weight: bold; padding: 14px 24px; cursor: pointer; text-decoration: none; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); letter-spacing: 0.5px; }
.btn-cut { clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.nier-btn:hover { background-color: var(--cyber-accent); color: #000; box-shadow: 0 0 20px rgba(212, 175, 55, 0.5); transform: translateY(-2px);}
.safe-success { background-color: var(--cyber-accent); color: #000; transition: background-color 1s ease; }
.safe-success:hover { background-color: #ffd700; box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); }


/* ==========================================================================
   [GUIDE: MEDIA FRAMES] Images & Videos
   ========================================================================== */
.media-frame { border: 1px solid var(--border-color); background: #000; padding: 6px; transition: border-color 1s ease; position: relative;}
.system-img { width: 100%; display: block; height: 180px; object-fit: cover; border: 1px solid var(--border-light); filter: grayscale(10%) contrast(110%); transition: border-color 1s ease, filter 0.4s ease;}
.system-img:hover { filter: grayscale(0%) contrast(100%); }
.system-video { width: 100%; display: block; height: auto; max-height: 250px; object-fit: contain; border: 1px solid var(--border-light); transition: border-color 1s ease;}
.caption { font-family: 'Consolas', monospace; font-size: 9px; color: var(--text-muted); margin-top: 8px; }

/* [GUIDE: STANDARD CARDS] */
.card { border: 1px solid var(--border-light); padding: 20px; background: var(--bg-panel); display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 1s ease, box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 1s ease; height: auto; }
.card h4 { text-transform: uppercase; font-size: 15px; font-weight: bold; margin: 15px 0 8px 0; color: #fff; letter-spacing: 0.5px; }


/* ==========================================================================
   [NOTE: UPGRADED FEATURE]: ARCHITECTURE SELECTION CARDS & PACKAGE CARDS
   Optimized to strictly fill the background dimensions and overlay text nicely.
   ========================================================================== */

/* The big choice cards (Subscription / Project) */
.arch-choice-card {
    background: linear-gradient(180deg, var(--bg-panel) 0%, #050505 100%);
    border: 1px solid var(--border-light);
    border-top: 3px solid var(--cyber-accent);
    padding: 40px 30px; /* Enhanced padding to support absolute background image */
    min-height: 380px; /* Ensures enough space for the background image and text */
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: inset 0 0 10px rgba(212,175,55,0.02);
    position: relative;
    overflow: hidden;
    /* [NEW] Flexbox settings to anchor text */
    display: flex;
    flex-direction: column;
    min-height: 400px; /* Adjust this height as needed to see your image better */
}

.arch-choice-card:hover {
    border-color: var(--cyber-accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.9), inset 0 0 30px rgba(212,175,55,0.2);
    transform: translateY(-4px); 
}

.arch-choice-card.active {
    border-color: var(--cyber-accent);
    background: linear-gradient(180deg, rgba(212,175,55,0.15) 0%, rgba(212,175,55,0.02) 100%);
    box-shadow: 0 5px 25px rgba(212,175,55,0.2), inset 0 0 40px rgba(212,175,55,0.15);
    transform: translateY(0);
}

/* [NOTE: UPGRADED PNG/GIF INJECTION WRAPPERS] Modified to fill the card as a background */
.arch-card-media-wrapper {
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    margin: 0; 
    display: flex; justify-content: center; align-items: center; 
    z-index: 0; /* Placed behind the text */
    overflow: hidden; 
}

/* [NOTE: ADDED GRADIENT OVERLAY] Ensures text readability against any user uploaded image */
.arch-card-media-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.3) 100%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.arch-choice-card:hover .arch-card-media-wrapper::after {
    opacity: 0.9; /* Darkens slightly on hover to keep text sharp */
}

.arch-card-dynamic-img {
    width: 104%; /* Slightly larger than the container to ensure full coverage */
    height: 100%; /* Full height to cover the card */
    object-fit: contain; /* Forces the image to fill the container entirely */
    opacity: 0.7; /* Soft transparency to blend into the terminal theme */
    filter: none;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
    position: relative;
    z-index: 0;
}

.arch-choice-card:hover .arch-card-dynamic-img {
    transform: scale(1.08);
    opacity: 0.7; /* Brightens the image slightly on hover */
    filter: none;
}

/* Ensure the text elements sit safely above the newly absolute background */
.arch-choice-card .arch-icon { position: relative; z-index: 2; font-size: 38px; color: var(--text-muted); margin-bottom: 15px; transition: color 0.4s ease; }
.arch-choice-card:hover .arch-icon { color: var(--cyber-accent); text-shadow: 0 0 15px rgba(212,175,55,0.6); transform: scale(1.1); }
.arch-choice-card.active .arch-icon { color: var(--cyber-accent); text-shadow: 0 0 20px rgba(212,175,55,0.9); }

.arch-choice-card h3 { position: relative; z-index: 2; color: #d4af37; font-size: 16px; margin-bottom: 10px; transition: color 0.4s; margin-top: auto; }
.arch-choice-card.active h3 { color: var(--cyber-accent); }
.arch-choice-card .desc-text { 
    position: relative; 
    z-index: 2; 
    margin-bottom: 0; /* Ensures no extra space at the bottom */
}
.arch-view-panel {
    animation: slideUpFade 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* The actual package cards inside the grids */
.package-card { 
    position: relative; overflow: hidden; z-index: 1; 
    border-top: 3px solid var(--cyber-accent); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background: linear-gradient(180deg, rgba(13,12,10,0.95) 0%, rgba(5,5,5,0.95) 100%);
    box-shadow: inset 0 0 20px rgba(212,175,55,0.02);
}
.package-card:hover { transform: translateY(-3px); border-color: var(--cyber-accent); box-shadow: inset 0 0 40px rgba(212,175,55,0.1), 0 10px 30px rgba(0,0,0,0.9); }
.package-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, transparent 50%, rgba(212,175,55,0.05) 51%); background-size: 100% 4px; z-index: 1; pointer-events: none; }
.package-card > * { position: relative; z-index: 2; }
.package-card .price { font-size: 24px; color: var(--cyber-accent); margin-bottom: 12px; margin-top: 10px; font-weight: bold; padding-bottom: 12px; transition: color 1s ease; text-shadow: 0 0 10px rgba(212,175,55,0.2);}


/* ==========================================================================
   [GUIDE: WINDOWS & OVERLAYS]
   ========================================================================== */
.onboarding-overlay { position: fixed; top:0; left:0; width:100vw; height:100vh; background: var(--bg-main); z-index: 9900; display:flex; flex-direction:column; overflow-y:auto; padding: 40px; transition: background-color 1s ease;}
#matrix-canvas-onboarding, #matrix-canvas-boot { position: absolute; top:0; left:0; width:100%; height:100%; z-index:1; opacity:0.15; pointer-events: none; }
.onboarding-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--cyber-accent); padding-bottom: 15px; position:relative; z-index:2; margin-bottom: 40px; transition: border-color 1s ease;}
.onboarding-content { max-width: 1050px; margin: 0 auto; width: 100%; position:relative; z-index:2; flex:1; }

.custom-window-modal { position: fixed; top:0; left:0; width:100vw; height:100vh; background: rgba(0,0,0,0.85); z-index: 10000; display:flex; align-items:center; justify-content:center; backdrop-filter: blur(5px); overflow: hidden; pointer-events: auto;}

/* [NOTE: OPTIMIZED MODAL REVEAL] Smoother entry animation */
.clean-window { width: 95%; max-width: 1000px; height: 85vh; background: var(--bg-panel); border: 2px solid var(--cyber-accent); display: flex; flex-direction: column; animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards; border-radius: 4px; overflow: hidden; box-shadow: 0 0 40px rgba(212,175,55,0.5), inset 0 0 20px rgba(212,175,55,0.15); transition: all 1s ease;}
.window-header { background: #111; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; transition: background-color 1s ease;}
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.thank-you-wrap { touch-action: none; overscroll-behavior: none; }
.thank-you-wrap .clean-window { width: auto; height: auto; max-width: none; max-height: none; border: none; border-radius: 0; background: transparent; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; box-shadow: none; }
.cyber-frame { width: auto; max-width: 90vw; max-height: 90vh; padding: 10px; background: #000; border: 2px solid var(--cyber-accent); position: relative; box-shadow: 0 0 50px rgba(212, 175, 55, 0.4); display: flex;}
.cyber-frame::before { content: ''; position: absolute; top:-5px; left:-5px; width: 20px; height: 20px; border-top: 3px solid var(--cyber-accent); border-left: 3px solid var(--cyber-accent); }
.cyber-frame::after { content: ''; position: absolute; bottom:-5px; right:-5px; width: 20px; height: 20px; border-bottom: 3px solid var(--cyber-accent); border-right: 3px solid var(--cyber-accent); }
.cyber-frame video { width: 100%; display: block; object-fit: contain;}

.cyber-frame-pulse { animation: framePulse 2s infinite; }
@keyframes framePulse { 0% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.2); border-color: var(--cyber-accent); } 50% { box-shadow: 0 0 50px rgba(212, 175, 55, 0.8); border-color: #fff; } 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.2); border-color: var(--cyber-accent); } }

.tc-window { width: 90%; max-width: 650px; height: auto; max-height: 80vh; flex-direction: row; align-items: stretch; transition: max-width 0.6s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.6s ease; box-shadow: 0 0 30px rgba(212, 175, 55, 0.4), inset 0 0 20px rgba(212, 175, 55, 0.15); }
.pane-expanded { max-width: 1100px !important; box-shadow: 0 0 60px rgba(212, 175, 55, 0.4); }

.tc-left-pane { flex: 1; display: flex; flex-direction: column; min-width: 50%; border-right: 1px dashed var(--border-light); background: linear-gradient(135deg, var(--bg-panel), #050505); transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
.tc-right-pane { width: 0; display: flex; flex-direction: column; overflow: hidden; opacity: 0; transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease; position: relative; background: #000; }
.pane-expanded .tc-right-pane { width: 100%; opacity: 1; min-width: 50%; }
.loading-iframe::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border: 3px solid var(--border-light); border-top-color: var(--cyber-accent); border-radius: 50%; animation: spin 1s linear infinite; z-index: 1; }
.loading-iframe iframe { opacity: 0; }
.tc-right-pane iframe { transition: opacity 0.5s ease; position: relative; z-index: 2; flex: 1; width: 100%; height: 100%; border: none; min-height: 400px; }

.dl-terminal-box { width: 450px; background: #050505; border: 1px solid var(--cyber-accent); padding: 25px; box-shadow: 0 0 30px rgba(212,175,55,0.15); animation: scanWipe 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards; transition: border-color 1s ease;}
.floating-sec-modal { position: absolute; border: 2px solid var(--cyber-accent); z-index: 99999; box-shadow: 0 0 40px rgba(212, 175, 55, 0.6); background: #000; animation: extremeGlitch 0.3s ease-out forwards; overflow: hidden; transition: border-color 1s ease, box-shadow 1s ease; pointer-events: none;}

/* [GUIDE: CONFIG TERMINAL STYLING] */
.auth-wrapper { border: 1px dashed var(--cyber-accent); padding: 40px; text-align: center; background: var(--bg-panel); margin-top: 30px; box-shadow: inset 0 0 30px rgba(212,175,55,0.05); transition: all 1s ease;}
.auth-input-row { display: flex; justify-content: center; gap: 15px; margin-top: 25px; }
.auth-error-msg { color: var(--danger-color); font-family: 'Consolas', monospace; font-weight: bold; margin-top: 20px; display: none; font-size: 13px; }

.pattern-lock-container { position: relative; width: 260px; height: 260px; margin: 30px auto; user-select: none; -webkit-user-select: none; touch-action: none; }
.pattern-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); width: 100%; height: 100%; position: relative; z-index: 2; }
.pattern-dot { width: 24px; height: 24px; margin: auto; border: 2px solid var(--cyber-accent); border-radius: 50%; background: transparent; cursor: pointer; transition: all 0.2s ease; box-shadow: inset 0 0 5px rgba(212, 175, 55, 0.2); }
.pattern-dot::after { content: ''; display: block; width: 8px; height: 8px; background: var(--cyber-accent); border-radius: 50%; margin: 6px auto; opacity: 0; transition: opacity 0.2s; }
.pattern-dot.active { background: rgba(212, 175, 55, 0.1); box-shadow: 0 0 15px rgba(212, 175, 55, 0.8); transform: scale(1.1); }
.pattern-dot.active::after { opacity: 1; }
.pattern-error .pattern-dot.active { border-color: var(--danger-color); box-shadow: 0 0 15px rgba(176, 42, 42, 0.8); }
.pattern-error .pattern-dot.active::after { background: var(--danger-color); }

.config-header-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--cyber-accent); padding-bottom: 20px; margin-bottom: 15px; transition: border-color 1s ease;}
.config-tabs-nav { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; border-bottom: 1px dashed var(--border-light); padding-bottom: 15px;}
.config-tab-btn { background: var(--bg-dark); color: var(--text-muted); border: 1px solid var(--border-light); padding: 8px 16px; font-family: 'Consolas', monospace; font-size: 11px; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); font-weight: bold; }
.config-tab-btn:hover { background: rgba(212,175,55,0.1); color: var(--cyber-accent); transform: translateY(-2px);}
.config-tab-btn.active { background: var(--cyber-accent); color: #000; border-color: var(--cyber-accent); box-shadow: 0 0 15px rgba(212,175,55,0.5); }

.config-accordion-sections { display: flex; flex-direction: column; }
.config-block-tab { display: none; animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;}
.config-block-tab.active-cfg { display: block; }
.config-block-title { background: var(--border-light); color: #fff; padding: 12px 18px; font-family: 'Consolas', monospace; font-weight: bold; font-size: 12px; letter-spacing: 1px; border-left: 3px solid var(--cyber-accent); transition: background-color 1s ease, border-color 1s ease; }
.config-form-container { padding: 25px; max-height: 500px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; border: 1px solid var(--border-light); background: var(--bg-panel);}
.config-form-row { display: grid; grid-template-columns: 40px 1fr 1fr 45px; gap: 20px; align-items: center; padding-bottom: 20px; border-bottom: 1px dashed var(--border-light); transition: border-color 1s ease;}
.config-form-row.header-row { font-family: 'Consolas', monospace; font-weight: bold; font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--border-light); padding-bottom: 8px; transition: border-color 1s ease;}
.config-input { background: #000; border: 1px solid var(--border-light); font-family: 'Consolas', monospace; padding: 12px; font-size: 12px; color: #fff; width: 100%; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); border-radius: 2px; }
.config-input:focus { border-color: var(--cyber-accent); outline: none; box-shadow: inset 0 0 10px rgba(212,175,55,0.3); }
.btn-remove-row { background: var(--danger-color); color: #fff; border: none; font-family: monospace; font-weight: bold; cursor: pointer; padding: 4px; height: 40px; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); transition: background 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.btn-remove-row:hover { background: #ff4444; transform: scale(1.05);}

.system-footer { margin-top: 40px; border-top: 1px solid var(--border-light); padding-top: 20px; transition: border-color 1s ease;}
.load-bar-row { display: flex; align-items: center; font-family: 'Consolas', monospace; font-size: 10px; font-weight: bold; margin-bottom: 8px; }
.load-lbl { width: 50px; color: var(--text-muted); }
.progress-track { flex: 1; background-color: rgba(255,255,255,0.05); border: 1px solid var(--border-light); height: 8px; margin: 0 15px; border-radius: 2px; overflow: hidden; transition: border-color 1s ease;}
.progress-fill-animated { height: 100%; background-color: var(--cyber-accent); box-shadow: 0 0 8px var(--cyber-accent); width: 0%; transition: width 0.1s linear, background-color 1s ease; }
.load-pct { width: 85px; text-align: right; font-size: 9px; letter-spacing: 0.5px; transition: color 0.3s; }
.load-pct.online { color: var(--cyber-accent); animation: pulseLive 1s infinite; font-size: 10px; }

.data-stream-ticker { font-family: 'Consolas', monospace; font-size: 8px; color: var(--cyber-accent); opacity: 0.6; overflow: hidden; white-space: nowrap; border-top: 1px dashed var(--border-light); padding-top: 6px; margin-top: 10px; margin-bottom: 10px; transition: color 1s ease, border-color 1s ease;}
.footer-meta { display: flex; justify-content: space-between; font-family: 'Consolas', monospace; font-size: 9px; color: var(--text-light); text-transform: uppercase; margin-top: 5px; }

#dynamic-copyright { display: none; position: relative; margin-top: 20px; text-align: center; font-size: 10px; color: var(--text-muted); letter-spacing: 1px; animation: pulseLive 4s infinite; transition: color 0.3s ease; z-index: 9999; pointer-events: none; }

.playlist-header { background: var(--bg-dark); color: var(--cyber-accent); padding: 10px 15px; font-family: 'Consolas', monospace; font-size: 10px; letter-spacing: 1px; border-bottom: 1px solid var(--border-light); transition: color 1s ease, border-color 1s ease, background-color 1s ease; }
.playlist-scroll-area { max-height: 250px; overflow-y: auto; }
.playlist-row { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px dashed var(--border-light); cursor: pointer; font-family: 'Consolas', monospace; font-size: 12px; transition: background 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.playlist-row:hover { background: rgba(212,175,55,0.1); padding-left: 20px; }
.playlist-row.active { background: var(--bg-dark); font-weight: bold; border-left: 4px solid var(--cyber-accent); }
.track-status { font-size: 10px; padding: 4px 8px; background: #000; border: 1px solid var(--border-light); color: var(--text-muted); border-radius: 2px; }
.playlist-row.active .track-status { background: var(--cyber-accent); color: #000; border-color: var(--cyber-accent); }
.hacked-track { background: rgba(176, 42, 42, 0.1); border-left: 4px solid var(--danger-color) !important; color: var(--danger-color) !important; }

.boot-screen, .pre-loader-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: #000; color: #fff; display: flex; align-items: center; justify-content: center; z-index: 10000; transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
#matrix-canvas-boot, #matrix-canvas-onboarding { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.15; pointer-events: none; }
.boot-box { width: 500px; border: 1px solid var(--cyber-accent); padding: 40px; background: #080808; position: relative; z-index: 2; box-shadow: 0 0 40px rgba(212, 175, 55, 0.15); transition: border-color 1s ease, box-shadow 1s ease;}
.glitch-title { font-family: 'Consolas', monospace; font-size: 22px; letter-spacing: 3px; margin: 15px 0; color: #fff; text-transform: uppercase; }

/* [GUIDE: RESPONSIVE BEHAVIOR] Ensures it looks good on mobile */
@media (max-width: 768px) { 
    .grid-2col { grid-template-columns: 1fr; } 
    .architecture-selection-container { grid-template-columns: 1fr !important; } /* Stacks cards on mobile */
    .identity-row { flex-direction: column; align-items: flex-start; gap: 15px; } 
    .config-form-row { grid-template-columns: 1fr; gap: 10px; } 
    .config-form-row.header-row { display: none; } 
    .index-lbl { text-align: left; background: rgba(255,255,255,0.05); padding: 6px 10px; color: var(--cyber-accent); } 
    .audio-deck { flex-direction: column; align-items: stretch; } 
    .audio-telemetry { min-width: 100%; } 
    .visualizer-row { flex-wrap: wrap; gap: 15px; } 
    .name-block { min-width: 100%; } 
    .tc-window { height: 90vh; max-height: none; flex-direction: column; overflow-y: auto;} 
    .tc-left-pane { min-width: 100%; border-right: none; border-bottom: 1px dashed var(--border-light); } 
    .pane-expanded .tc-right-pane { min-height: 500px; } 
}

/* [GUIDE: AUTOFILL FIX] Prevents browser autofill from turning inputs white */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0px 1000px #000 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================================================
   [GUIDE: CALENDAR SKIN (FLATPICKR)] 
   Overrides the default white calendar to match your Gold/Black aesthetic.
   ========================================================================== */
.flatpickr-calendar {
    background: #080808 !important; border: 1px solid var(--cyber-accent) !important;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.15) !important; font-family: 'Consolas', monospace !important;
    color: #fff !important; border-radius: 0 !important;
}
.flatpickr-months .flatpickr-month, 
.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month { color: var(--cyber-accent) !important; fill: var(--cyber-accent) !important; }
span.flatpickr-weekday { color: var(--text-muted) !important; font-family: 'Consolas', monospace !important; }
.flatpickr-day { color: #dfdfdf !important; border-radius: 0 !important; border: 1px solid transparent; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, 
.flatpickr-day.selected:focus, .flatpickr-day.selected:hover { background: var(--cyber-accent) !important; color: #000 !important; border-color: var(--cyber-accent) !important; font-weight: bold; }
.flatpickr-day:hover { background: rgba(212, 175, 55, 0.2) !important; border-color: transparent !important; }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover { color: #333 !important; }
.flatpickr-time { border-top: 1px dashed var(--border-light) !important; }
.flatpickr-time input, .flatpickr-time .flatpickr-am-pm { color: var(--cyber-accent) !important; font-family: 'Consolas', monospace !important; }
.flatpickr-time input:hover, .flatpickr-time .flatpickr-am-pm:hover, .flatpickr-time input:focus { background: rgba(212, 175, 55, 0.1) !important; }
.flatpickr-current-month .numInputWrapper { width: 6.5ch; }

/* ==========================================================================
   [GUIDE: PRE-LOADER FRAME] 
   Ensures the pre-loader content fits nicely inside a responsive frame.
   ========================================================================== */
/* [NOTE: Perfectly fits the pre-loader content inside a frame] */
.pre-loader-frame {
    width: 90%;          /* Responsive width */
    max-width: 500px;    /* Prevents it from getting too wide */
    /* ADD OR MODIFY THESE TWO LINES: */
    height: auto;        /* 'auto' lets it grow with content, set a fixed value like '400px' to force a specific height */
    min-height: 300px;   /* This ensures it never gets shorter than 300px, keeping the frame shape */
    padding: 50px !important; /* Premium spacing around the content */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* [NOTE: Ensures the inner progress bar doesn't break the frame layout] */
#loader-bars-container {
    margin-top: 25px;
    width: 100%;
}