/* 
====================================================================
   THODBERRY INTELLIGENCE - 'VOID' DESIGN SYSTEM (FIXED)
   Premium / Dark / Usable
   Updated: Dec 2025 (Reverted & Polished)
==================================================================== 
*/

:root {
    /* --- PALETTE: THE VOID (Revised for Contrast) --- */
    --bg-void: #030303;
    /* Deepest black */
    --bg-surface: #0E0E0E;
    /* Elevated surface */
    --bg-panel: #161616;
    /* Card background */

    /* --- ACCENTS --- */
    --accent-primary: #00F0FF;
    /* Electric Cyan */
    --accent-secondary: #7000FF;
    /* Deep Violet */
    --accent-alert: #FF2E2E;
    /* Critical/Error */
    --accent-success: #00FF94;
    /* Success */

    /* --- TEXT --- */
    --text-primary: #FFFFFF;
    /* Pure White for max contrast */
    --text-secondary: #AAAAAA;
    /* Readable Grey */
    --text-muted: #666666;
    /* Labels */

    /* --- BORDERS --- */
    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(0, 240, 255, 0.4);

    /* --- TYPOGRAPHY (Scaled Down slightly for fit) --- */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Grotesk', monospace;

    /* --- SPACING & EFFECTS --- */
    --glass: blur(16px) saturate(180%);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Noise Texture Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--noise);
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
    /* Reduced opacity for better text clarity */
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    /* Scaled down from 6rem for better fit */
    font-weight: 700;
    background: linear-gradient(to right, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

p {
    max-width: 65ch;
    margin-bottom: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* --- FORM INPUTS (CRITICAL FIX FOR ADMIN) --- */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    background: #1A1A1A;
    /* Solid dark background, no transparency */
    border: 1px solid var(--border-subtle);
    color: #FFFFFF;
    /* Force white text */
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

/* Fix for Select Dropdowns in Dark Mode */
.form-select option {
    background-color: #1A1A1A;
    color: #FFFFFF;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px -5px var(--accent-primary);
    background: #222;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    border-radius: var(--radius-sm);
    /* Added rounding for refinement */
}

.btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.05);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-void);
    border-color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
}

/* --- UTILITIES --- */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Reusable Force Center for stubborn elements */
.force-center {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    max-width: 800px;
    /* legible formatting */
}

.flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.gap-4 {
    gap: 1rem;
}

.mb-6 {
    margin-bottom: 2rem;
}

.mb-8 {
    margin-bottom: 3rem;
}

.text-secondary {
    color: var(--text-secondary);
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

/* --- GRID SYSTEM --- */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}
