/**
 * Schmidt Digital - Synthwave Theme (Main CSS)
 * 
 * A futuristic digital aesthetic inspired by neon, synthwave, cyberpunk, 
 * and holographic UI styles.
 */

/* ============================================
   1. CSS Variables & Theme Configuration
   ============================================ */
:root {
    /* --- Core Palette --- */
    --color-primary: #ff2a6d;
    --color-primary-dark: #c40045;
    --color-primary-light: #ff5c95;

    --color-secondary: #05d9e8;
    --color-secondary-dark: #0098a3;
    --color-secondary-light: #6effff;

    --color-accent: #f8c630; /* Electric Yellow */
    --color-accent-alt: #7700ff; /* Deep Purple */

    --color-text: #f0f0f0;
    --color-text-light: #b0b0b0;
    --color-text-muted: #777777;
    --color-text-inverse: #101010;

    --color-bg: #0b0c15; /* Deep space blue-black */
    --color-bg-alt: #131524;
    --color-bg-dark: #05060a;
    --color-bg-transparent: rgba(19, 21, 36, 0.85);

    --color-border: #2a2d3e;
    --color-border-light: #444a66;
    --color-border-glow: rgba(5, 217, 232, 0.3);

    --color-success: #00ff9d;
    --color-error: #ff0055;
    --color-warning: #ffb800;
    --color-info: #05d9e8;

    /* --- Typography --- */
    --font-family-base: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    --font-family-heading: 'Orbitron', 'Segoe UI', Roboto, sans-serif; /* Assumes Orbitron is loaded, fallback to clean sans */
    --font-family-mono: 'Fira Code', 'Consolas', monospace;

    /* Font Sizes */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    /* Line Heights */
    --line-height-base: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-tight: 1.2;

    /* --- Spacing --- */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;
    
    /* Layout */
    --container-width: 1200px;
    --container-padding: 1.5rem;
    --header-height: 80px;

    /* --- Borders & Radii --- */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --border-width: 1px;

    /* --- Effects --- */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 15px rgba(5, 217, 232, 0.15);
    --shadow-glow-primary: 0 0 20px rgba(255, 42, 109, 0.25);

    /* --- Transitions --- */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* --- Z-Index --- */
    --z-index-sticky: 1000;
    --z-index-overlay: 2000;
    --z-index-modal: 3000;
}

/* Light Theme Variables */
html[data-theme="light"] {
    --color-bg: #f5f6fa;
    --color-bg-alt: #ffffff;
    --color-bg-dark: #e1e2e6;
    --color-bg-transparent: rgba(255, 255, 255, 0.9);
    
    --color-text: #2d3436;
    --color-text-light: #636e72;
    --color-text-muted: #b2bec3;
    --color-text-inverse: #ffffff;
    
    --color-border: #dfe6e9;
    --color-border-light: #b2bec3;
    
    --color-primary: #d63031;
    --color-primary-dark: #b71c1c;
    --color-primary-light: #ff7675;
    
    --color-secondary: #0984e3;
    --color-secondary-dark: #006266;
    --color-secondary-light: #74b9ff;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] body::before {
    background: 
        linear-gradient(rgba(245, 246, 250, 0.9) 0%, rgba(245, 246, 250, 0.4) 100%),
        linear-gradient(0deg, rgba(9, 132, 227, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(9, 132, 227, 0.05) 1px, transparent 1px);
    mask-image: none;
    -webkit-mask-image: none;
}

html[data-theme="light"] .card, 
html[data-theme="light"] .panel {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

html[data-theme="light"] .page-header__title {
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background: #ffffff;
    border-color: var(--color-border);
    color: var(--color-text);
}

html[data-theme="light"] input:focus, 
html[data-theme="light"] textarea:focus, 
html[data-theme="light"] select:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.1);
}

/* ============================================
   2. Theme Modes
   ============================================ */
html {
    color-scheme: dark light;
}

/* ============================================
   3. Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Retro Grid Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(11, 12, 21, 0.9) 0%, rgba(11, 12, 21, 0.4) 100%),
        linear-gradient(0deg, rgba(5, 217, 232, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(5, 217, 232, 0.1) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-position: center top;
    transform: perspective(500px) rotateX(20deg) scale(1.5) translateY(-100px);
    transform-origin: top center;
    z-index: -1;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, transparent 10%, black 90%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 10%, black 90%);
}

/* Outrun Grid Layer */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, rgba(255, 42, 109, 0.08) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(5, 217, 232, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, rgba(248, 198, 48, 0.06) 1px, transparent 1px),
        linear-gradient(-135deg, rgba(119, 0, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px, 80px 80px, 80px 80px;
    background-position: 0 0, 30px 30px, 0 0, 40px 40px;
    transform: perspective(800px) rotateX(15deg) scale(1.2) translateY(-50px);
    transform-origin: center;
    z-index: -2;
    pointer-events: none;
    opacity: 0.9;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    line-height: var(--line-height-tight);
}

h1 { font-size: var(--font-size-5xl); text-shadow: 0 0 10px rgba(255, 42, 109, 0.5); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--color-secondary-light);
    text-shadow: 0 0 8px var(--color-secondary);
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-md);
}

/* ============================================
   4. Layout & Containers
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   5. Components
   ============================================ */

/* --- Buttons --- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--radius-sm); /* More angular for cyberpunk feel */
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
}

/* Primary Button (Neon Pink) */
.button--primary {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: inset 0 0 10px rgba(255, 42, 109, 0.2);
}

.button--primary:hover {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 20px rgba(255, 42, 109, 0.6), inset 0 0 0 rgba(0,0,0,0);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* Secondary Button (Neon Cyan) */
.button--secondary {
    background-color: transparent;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    box-shadow: inset 0 0 10px rgba(5, 217, 232, 0.2);
}

.button--secondary:hover {
    background-color: var(--color-secondary);
    color: var(--color-bg-dark);
    box-shadow: 0 0 20px rgba(5, 217, 232, 0.6);
    transform: translateY(-2px);
}

.button--large {
    padding: 1rem 3rem;
    font-size: var(--font-size-lg);
}

/* --- Cards / Glassmorphism --- */
.card, .panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
    position: relative;
}

.card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(5, 217, 232, 0.15);
    transform: translateY(-5px);
}

/* --- Forms --- */
.form-group {
    margin-bottom: var(--spacing-lg);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--color-secondary);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-family-base);
    transition: all var(--transition-fast);
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(255, 42, 109, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

/* --- Utilities --- */
.text-center { text-align: center; }

.text-gradient {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.3;
}

/* ============================================
   10. Shared Page Header
   ============================================ */
.page-header {
    background: transparent;
    color: white;
    padding: var(--spacing-4xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(5, 217, 232, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

.page-header__container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 1;
}

.page-header__title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
    background: linear-gradient(to right, #fff, var(--color-secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 15px rgba(5, 217, 232, 0.4);
}

.page-header__subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .page-header {
        padding: var(--spacing-2xl) 0;
    }

    .page-header__title {
        font-size: var(--font-size-3xl);
    }
}
