/* ═══════════════════════════════════════════════════════════════
   TIPPSPIEL PRO v3.1 - INTUITIVE DESIGN SYSTEM
   Modern, Clean & User-Friendly Interface
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────── */
/* 1. CSS CUSTOM PROPERTIES - Simplified & Intuitive */
/* ───────────────────────────────────────────────────────────── */

:root {
    /* Primary Brand Colors - Calmer Teal */
    --primary: #06B6D4;
    --primary-hover: #0891B2;
    --primary-light: #67E8F9;
    --primary-dark: #0E7490;
    --primary-50: rgba(6, 182, 212, 0.05);
    --primary-100: rgba(6, 182, 212, 0.1);
    --primary-200: rgba(6, 182, 212, 0.2);
    
    /* Accent Colors - Softer Purple */
    --accent: #8B5CF6;
    --accent-hover: #7C3AED;
    --accent-light: #A78BFA;
    --accent-50: rgba(139, 92, 246, 0.05);
    --accent-100: rgba(139, 92, 246, 0.1);
    
    /* Neutrals - Enhanced Contrast */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Dark Mode (Default) */
    --bg: #0F1419;
    --bg-secondary: #1A1F29;
    --surface: #222831;
    --surface-hover: #2D3748;
    --surface-elevated: #374151;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
    --text: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    --text-disabled: #6B7280;
    
    /* Semantic Colors */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3B82F6;
    --info-bg: rgba(59, 130, 246, 0.1);
    
    /* Refined Shadows - Softer & More Realistic */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.18), 0 6px 12px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 24px rgba(6, 182, 212, 0.3);
    --shadow-glow-strong: 0 0 32px rgba(6, 182, 212, 0.5);
    
    /* Border Radius - More Consistent */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing Scale - More Generous */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;
    --space-32: 128px;
    
    /* Typography - Refined Scale */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', Courier, monospace;
    
    --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.813rem);
    --text-sm: clamp(0.875rem, 0.825rem + 0.25vw, 0.938rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.063rem);
    --text-lg: clamp(1.125rem, 1.063rem + 0.313vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.175rem + 0.375vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.375rem + 0.625vw, 1.875rem);
    --text-3xl: clamp(1.875rem, 1.688rem + 0.938vw, 2.25rem);
    --text-4xl: clamp(2.25rem, 2rem + 1.25vw, 3rem);
    --text-5xl: clamp(2.5rem, 2.125rem + 1.875vw, 3.75rem);
    --text-6xl: clamp(3rem, 2.5rem + 2.5vw, 4.5rem);
    
    /* Transitions - Snappier Feel */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-popover: 60;
    --z-tooltip: 70;
}

/* Light Mode Variables */
body.light-mode {
    --bg: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --surface: #FFFFFF;
    --surface-hover: #F3F4F6;
    --surface-elevated: #F9FAFB;
    --border: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.2);
    --text: #111827;
    --text-secondary: #374151;
    --text-muted: #6B7280;
    --text-disabled: #9CA3AF;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.12), 0 6px 12px rgba(0, 0, 0, 0.08);
    --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ───────────────────────────────────────────────────────────── */
/* 2. RESET & FOUNDATIONAL STYLES */
/* ───────────────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition-base), color var(--transition-base);
    min-height: 100vh;
}

/* ───────────────────────────────────────────────────────────── */
/* 3. ENHANCED ACCESSIBILITY */
/* ───────────────────────────────────────────────────────────── */

.skip-to-content {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    z-index: 100;
    padding: var(--space-3) var(--space-6);
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: top var(--transition-fast);
    box-shadow: var(--shadow-lg);
}

.skip-to-content:focus {
    top: var(--space-4);
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

button:focus-visible,
a:focus-visible {
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 4. TYPOGRAPHY - Clear & Readable */
/* ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-6xl); font-weight: 800; }
h2 { font-size: var(--text-4xl); font-weight: 700; }
h3 { font-size: var(--text-3xl); font-weight: 700; }
h4 { font-size: var(--text-2xl); font-weight: 600; }
h5 { font-size: var(--text-xl); font-weight: 600; }
h6 { font-size: var(--text-lg); font-weight: 600; }

p {
    margin-bottom: var(--space-4);
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.7;
}

.text-muted {
    color: var(--text-muted);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* ───────────────────────────────────────────────────────────── */
/* 5. LAYOUT CONTAINERS */
/* ───────────────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 6. HEADER & NAVIGATION - Cleaner Design */
/* ───────────────────────────────────────────────────────────── */

.app-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.app-header.scrolled {
    box-shadow: var(--shadow-md);
    background: var(--surface-elevated);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    user-select: none;
}

.brand-logo {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.brand-logo:hover {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.brand-logo i {
    font-size: 20px;
    color: white;
}

.brand-title {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
}

.version-badge {
    padding: 3px 10px;
    background: var(--primary-200);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: var(--primary-100);
    color: var(--primary);
}

.nav-link i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .nav-link span {
        display: none;
    }
    
    .nav-link {
        padding: var(--space-2);
        min-width: 40px;
        justify-content: center;
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 7. HERO SECTION - Simplified & Focused */
/* ───────────────────────────────────────────────────────────── */

.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-24) var(--space-6);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 30% 20%, var(--primary-50) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, var(--accent-50) 0%, transparent 50%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 25s ease-in-out infinite;
    pointer-events: none;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -40px) scale(1.05); }
    50% { transform: translate(-30px, 30px) scale(0.95); }
    75% { transform: translate(30px, 40px) scale(1.05); }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-headline {
    font-size: var(--text-6xl);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    letter-spacing: -0.03em;
}

.hero-subheadline {
    font-size: var(--text-xl);
    color: var(--text-muted);
    margin-bottom: var(--space-10);
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-10);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    animation: bounce 2s ease-in-out infinite;
    opacity: 0.6;
}

.mouse {
    width: 22px;
    height: 36px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s ease-in-out infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        padding: var(--space-16) var(--space-4);
    }
    
    .hero-headline {
        font-size: var(--text-4xl);
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 8. WAVE DIVIDER */
/* ───────────────────────────────────────────────────────────── */

.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-fill {
    fill: var(--bg-secondary);
}

/* ───────────────────────────────────────────────────────────── */
/* 9. SECTIONS - Better Spacing */
/* ───────────────────────────────────────────────────────────── */

section {
    padding: var(--space-24) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--primary-100);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 900;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.section-description {
    font-size: var(--text-lg);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

@media (max-width: 768px) {
    section {
        padding: var(--space-16) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-10);
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 10. CARDS - Modern & Clean */
/* ───────────────────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    gap: var(--space-4);
    flex-wrap: wrap;
}

.card-header h2,
.card-header h3 {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-2xl);
    font-weight: 700;
    margin: 0;
}

.card-header i {
    color: var(--primary);
    font-size: 24px;
}

.card-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Feature Cards */
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    transition: all var(--transition-base);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-6);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.feature-icon i {
    font-size: 32px;
    color: white;
}

.feature-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    margin: 0;
    font-size: var(--text-base);
    line-height: 1.6;
}

/* ───────────────────────────────────────────────────────────── */
/* 11. TAB NAVIGATION - More Intuitive */
/* ───────────────────────────────────────────────────────────── */

.tab-navigation {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
    padding: var(--space-1);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.tab-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: var(--text-base);
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.tab-button.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-button i {
    font-size: 18px;
}

.tab-panel {
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel[hidden] {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .tab-button span {
        display: none;
    }
    
    .tab-button {
        padding: var(--space-3);
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 12. FORMS - Improved Usability */
/* ───────────────────────────────────────────────────────────── */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--space-4);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.form-row label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row label i {
    font-size: 14px;
    color: var(--text-muted);
}

input[type="text"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    line-height: 1.5;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--border-strong);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
    background: var(--surface);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

.output-textarea {
    min-height: 320px;
    resize: vertical;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.form-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
    flex-wrap: wrap;
}

.hint {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--primary-50);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

.hint i {
    color: var(--primary);
    margin-top: 2px;
    font-size: 18px;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 13. BUTTONS - Enhanced Touch Targets */
/* ───────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 24px;
    min-height: 44px; /* Touch-friendly */
    font-size: var(--text-base);
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn i {
    font-size: 18px;
}

/* Primary Button */
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Large Button */
.btn-lg {
    padding: 16px 32px;
    font-size: var(--text-lg);
    min-height: 52px;
}

/* Hero Buttons */
.btn-hero-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 18px 36px;
    font-size: var(--text-lg);
    min-height: 56px;
    box-shadow: var(--shadow-xl);
}

.btn-hero-primary:hover {
    box-shadow: var(--shadow-2xl), var(--shadow-glow-strong);
    transform: translateY(-3px);
}

.btn-hero-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border-strong);
    padding: 16px 34px;
    font-size: var(--text-lg);
    min-height: 56px;
}

.btn-hero-secondary:hover {
    border-color: var(--primary);
    background: var(--primary-50);
    color: var(--primary);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    color: var(--text);
}

/* Danger Button */
.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger);
    filter: brightness(0.9);
}

.btn-ghost.btn-danger:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

@media (max-width: 640px) {
    .btn {
        width: 100%;
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 14. STATISTICS & TABLES */
/* ───────────────────────────────────────────────────────────── */

.stats-controls {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.search-box input {
    padding-left: 42px;
}

.add-website-form {
    display: flex;
    gap: var(--space-3);
    flex: 1;
    min-width: 320px;
}

.add-website-form input {
    flex: 1;
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table thead th {
    text-align: left;
    padding: var(--space-4);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}

.table tbody td {
    padding: var(--space-4);
    border-top: 1px solid var(--border);
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--primary-50);
}

.loading-state {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-12) !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--text-sm);
}

@media (max-width: 768px) {
    .stats-controls {
        flex-direction: column;
    }
    
    .search-box,
    .add-website-form {
        width: 100%;
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 15. FOOTER */
/* ───────────────────────────────────────────────────────────── */

.app-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-20) 0 var(--space-8);
    margin-top: var(--space-24);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-10);
    margin-bottom: var(--space-10);
}

.footer-section h4 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text);
}

.footer-section p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-2);
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.social-links a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin: 0;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 16. TOAST NOTIFICATIONS */
/* ───────────────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-popover);
    padding: var(--space-4) var(--space-6);
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    color: var(--text);
    font-weight: 600;
    font-size: var(--text-base);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 420px;
    min-width: 300px;
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
    transition: all var(--transition-bounce);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast i {
    font-size: 20px;
    color: var(--primary);
}

@media (max-width: 640px) {
    .toast {
        left: var(--space-4);
        right: var(--space-4);
        max-width: none;
        min-width: auto;
    }
}

/* ───────────────────────────────────────────────────────────── */
/* 17. SCROLLBAR STYLING */
/* ───────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg);
}

/* ───────────────────────────────────────────────────────────── */
/* 18. UTILITY CLASSES */
/* ───────────────────────────────────────────────────────────── */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }

/* ───────────────────────────────────────────────────────────── */
/* 19. RESPONSIVE HELPERS */
/* ───────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 641px) {
    .show-mobile { display: none !important; }
}

/* ───────────────────────────────────────────────────────────── */
/* 20. PRINT STYLES */
/* ───────────────────────────────────────────────────────────── */

@media print {
    .app-header,
    .app-footer,
    .hero-section,
    .btn,
    .nav-link,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
}