/**
 * L2ControlHub - Modern Design System
 * A clean, minimal dark theme
 */

/* ========================================
   CSS Variables / Design Tokens
   ======================================== */
:root {
    /* Colors - Dark Theme */
    --color-bg-primary: #09090b;
    --color-bg-secondary: #0f0f12;
    --color-bg-card: #141418;
    --color-bg-elevated: #1a1a1f;
    --color-bg-input: #18181b;
    --color-bg-hover: #1f1f24;
    
    /* Text Colors */
    --color-text-primary: #fafafa;
    --color-text-secondary: #a1a1aa;
    --color-text-muted: #71717a;
    --color-text-placeholder: #52525b;
    
    /* Border Colors */
    --color-border: #27272a;
    --color-border-hover: #3f3f46;
    --color-border-focus: #6366f1;
    
    /* Accent Colors */
    --color-accent: #6366f1;
    --color-accent-hover: #818cf8;
    --color-accent-subtle: rgba(99, 102, 241, 0.1);
    
    /* Status Colors */
    --color-success: #22c55e;
    --color-success-subtle: rgba(34, 197, 94, 0.1);
    --color-warning: #f59e0b;
    --color-warning-subtle: rgba(245, 158, 11, 0.1);
    --color-error: #ef4444;
    --color-error-subtle: rgba(239, 68, 68, 0.1);
    
    /* Category Colors */
    --color-security: #ef4444;
    --color-generators: #f97316;
    --color-converters: #eab308;
    --color-network: #22c55e;
    --color-web: #14b8a6;
    --color-code: #3b82f6;
    --color-data: #6366f1;
    --color-text-tools: #8b5cf6;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Consolas', monospace;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Layout */
    --container-max: 1200px;
    --header-height: 64px;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
    color: var(--color-text-secondary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: var(--space-1) var(--space-2);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--color-accent);
}

/* ========================================
   Layout
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

main {
    flex: 1;
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--color-text-primary);
    text-decoration: none;
}

.header__logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
    border-radius: var(--radius-md);
    color: white;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    list-style: none;
}

.nav__link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link--active {
    color: var(--color-text-primary);
}

.nav__cta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.nav__cta:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
    color: var(--color-text-primary);
}

.mobile-menu-btn {
    display: none;
    padding: var(--space-2);
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
}

/* Mobile Menu Panel */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-menu__link:hover,
.mobile-menu__link--active {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.mobile-menu__link--active {
    background: var(--color-accent-subtle);
    color: var(--color-accent);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    padding: var(--space-20) 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero__content {
    max-width: 540px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: var(--color-accent-subtle);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: var(--space-6);
}

.hero__title {
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
}

.hero__visual {
    position: relative;
}

/* Code Window */
.code-window {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.code-window__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
}

.code-window__dots {
    display: flex;
    gap: var(--space-2);
}

.code-window__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-window__dot--red { background: #ff5f57; }
.code-window__dot--yellow { background: #febc2e; }
.code-window__dot--green { background: #28c840; }

.code-window__title {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.code-window__body {
    padding: var(--space-6);
    max-height: 450px;
    overflow-y: auto;
}

.code-window pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* Syntax Highlighting */
.code-window .keyword { color: #c678dd; font-weight: 500; }
.code-window .class-name { color: #e5c07b; }
.code-window .function { color: #61afef; }
.code-window .string { color: #98c379; }
.code-window .comment { color: #5c6370; font-style: italic; }
.code-window .number { color: #d19a66; }

/* ========================================
   Features Section
   ======================================== */
.features-section {
    padding: var(--space-20) 0;
    background: var(--color-bg-secondary);
}

.features-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-12);
}

.features-header h2 {
    margin-bottom: var(--space-4);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.feature-card {
    padding: var(--space-6);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.feature-card__icon--red {
    background: var(--color-error-subtle);
    color: var(--color-error);
}

.feature-card__icon--purple {
    background: var(--color-accent-subtle);
    color: var(--color-accent);
}

.feature-card__icon--blue {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.feature-card__icon--green {
    background: var(--color-success-subtle);
    color: var(--color-success);
}

.feature-card__title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.feature-card__description {
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    padding: var(--space-20) 0;
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    margin-bottom: var(--space-4);
}

.cta-content p {
    margin-bottom: var(--space-8);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn--primary {
    background: var(--color-accent);
    color: white;
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.btn--secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
    color: var(--color-text-primary);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn--ghost:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.btn--sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn--lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
}

.btn--icon {
    padding: var(--space-2);
    width: 36px;
    height: 36px;
}

/* ========================================
   Tool Cards
   ======================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
    align-items: stretch;
}

.tool-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-5);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    height: 100%;
    min-height: 180px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-card--coming-soon {
    opacity: 0.7;
    cursor: default;
}

.tool-card--coming-soon:hover {
    transform: none;
    box-shadow: none;
}

.tool-card__badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    padding: var(--space-1) var(--space-2);
    background: var(--color-warning-subtle);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-warning);
}

.tool-card__header {
    margin-bottom: var(--space-3);
}

.tool-card__title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-primary);
}

.tool-card__description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: auto;
}

/* Category Section */
.category-section {
    margin-bottom: var(--space-12);
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: white;
}

.category-icon--security { background: linear-gradient(135deg, var(--color-security), #dc2626); }
.category-icon--generators { background: linear-gradient(135deg, var(--color-generators), #ea580c); }
.category-icon--converters { background: linear-gradient(135deg, var(--color-converters), #ca8a04); }
.category-icon--network { background: linear-gradient(135deg, var(--color-network), #16a34a); }
.category-icon--web { background: linear-gradient(135deg, var(--color-web), #0d9488); }
.category-icon--code { background: linear-gradient(135deg, var(--color-code), #2563eb); }
.category-icon--data { background: linear-gradient(135deg, var(--color-data), #4f46e5); }
.category-icon--text { background: linear-gradient(135deg, var(--color-text-tools), #7c3aed); }

.category-info h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}

.category-info p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ========================================
   Tags
   ======================================== */
.tag {
    display: inline-flex;
    padding: var(--space-1) var(--space-2);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.tool-card:hover .tag {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
    color: var(--color-text-secondary);
}

/* ========================================
   Search
   ======================================== */
.search-section {
    padding: var(--space-4) 0;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.search-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-wrapper svg {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    padding-left: calc(var(--space-4) + 24px);
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
}

.search-input::placeholder {
    color: var(--color-text-placeholder);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

/* ========================================
   Tool Page Layout
   ======================================== */
.tool-page {
    padding: var(--space-8) 0;
    min-height: calc(100vh - var(--header-height) - 200px);
}

.tool-page .tabs {
    margin-bottom: var(--space-6);
}

.tool-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}

.tool-header__info h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

.tool-header__info p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    max-width: 600px;
}

.tool-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    align-items: stretch;
}

/* Single panel - full width */
.tool-content > .panel:only-child {
    grid-column: 1 / -1;
}

.tool-content > .panel {
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.tool-content > .panel .panel__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tool-content > .panel .form-textarea {
    flex: 1;
    min-height: 280px;
}

.tool-content--single {
    grid-template-columns: 1fr;
}

/* Tool Panels */
.panel {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
}

.panel__title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-primary);
}

.panel__actions {
    display: flex;
    gap: var(--space-2);
}

.panel__body {
    padding: var(--space-5);
}

/* Panel results container for consistent height */
.panel__body > div:only-child:not(.form-group):not(.toggle-group):not(.slider-group) {
    min-height: 280px;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-placeholder);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
    line-height: 1.6;
}

/* Checkbox / Toggle */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-item:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
}

.toggle-item input[type="checkbox"] {
    appearance: none;
    width: 40px;
    height: 22px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toggle-item input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--color-text-primary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle-item input[type="checkbox"]:checked {
    background: var(--color-accent);
}

.toggle-item input[type="checkbox"]:checked::before {
    left: 20px;
}

.toggle-item span {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Range Slider */
.slider-group {
    margin-bottom: var(--space-5);
}

.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.slider-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
}

.slider-value {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-accent-subtle);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* ========================================
   Tabs
   ======================================== */
.tabs {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-1);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.tab {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--color-text-secondary);
    background: var(--color-bg-hover);
}

.tab.active {
    color: var(--color-text-primary);
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-12) 0 var(--space-8);
    margin-top: auto;
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-8);
}

.footer__brand p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-top: var(--space-4);
    max-width: 300px;
}

.footer__title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: var(--space-2);
}

.footer__links a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: var(--color-text-primary);
}

.footer__bottom {
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer__bottom p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 320px;
    max-width: 420px;
    padding: var(--space-4);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: slideIn 0.3s ease;
}

.toast--success { border-left: 3px solid var(--color-success); }
.toast--error { border-left: 3px solid var(--color-error); }
.toast--warning { border-left: 3px solid var(--color-warning); }

.toast__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast--success .toast__icon { color: var(--color-success); }
.toast--error .toast__icon { color: var(--color-error); }
.toast--warning .toast__icon { color: var(--color-warning); }

.toast__content {
    flex: 1;
}

.toast__title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.toast__message {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.toast__close {
    padding: var(--space-1);
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.toast__close:hover {
    color: var(--color-text-primary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-hover);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-bg-secondary);
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.hidden { display: none !important; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
    
    .hero__visual {
        order: -1;
    }
    
    .hero__content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero__badge {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero__actions {
        justify-content: center;
    }
    
    .tool-content {
        grid-template-columns: 1fr;
    }
    
    .tool-content > .panel {
        min-height: auto;
    }
    
    .tool-content > .panel .form-textarea {
        min-height: 200px;
    }
    
    .footer__inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }
    
    .container {
        padding: 0 var(--space-4);
    }
    
    .nav__list,
    .nav__cta {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Hero Mobile */
    .hero {
        padding: var(--space-8) 0;
    }
    
    .hero__badge {
        font-size: 0.7rem;
        padding: var(--space-1) var(--space-2);
    }
    
    .hero__title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-4);
    }
    
    .hero__description {
        font-size: var(--text-base);
        margin-bottom: var(--space-6);
    }
    
    .hero__actions {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Hide code window on mobile */
    .hero__visual {
        display: none;
    }
    
    /* Tool Header Mobile */
    .tool-header {
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .tool-header .btn {
        align-self: flex-start;
    }
    
    /* Tools Grid */
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    /* Category Header Mobile */
    .category-header {
        flex-wrap: wrap;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
    }
    
    .category-info h2 {
        font-size: var(--text-lg);
    }
    
    /* Footer Mobile */
    .footer__inner {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    /* Toast Mobile */
    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .features-section {
        padding: var(--space-12) 0;
    }
    
    .features-header {
        margin-bottom: var(--space-8);
    }
    
    .cta-section {
        padding: var(--space-12) 0;
    }
    
    .cta-content p {
        margin-bottom: var(--space-6);
    }
}

@media (max-width: 480px) {
    :root {
        --text-4xl: 1.5rem;
        --text-3xl: 1.25rem;
    }
    
    .container {
        padding: 0 var(--space-3);
    }
    
    .hero {
        padding: var(--space-6) 0;
    }
    
    .hero__badge {
        font-size: 0.65rem;
    }
    
    .hero__description {
        font-size: var(--text-sm);
    }
    
    /* Code window on very small screens */
    .code-window__body {
        max-height: 200px;
    }
    
    .btn--lg {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-sm);
    }
    
    .panel__body {
        padding: var(--space-4);
    }
    
    .panel__header {
        padding: var(--space-3) var(--space-4);
    }
    
    .feature-card {
        padding: var(--space-5);
    }
    
    .feature-card__icon {
        width: 40px;
        height: 40px;
    }
    
    .feature-card__title {
        font-size: var(--text-base);
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease;
}

/* Stagger animation for tool cards */
.tool-card {
    animation: fadeInUp 0.4s ease backwards;
}

.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }
.tool-card:nth-child(7) { animation-delay: 0.35s; }
.tool-card:nth-child(8) { animation-delay: 0.4s; }
