/* style.css - Modern styling for FWChecker Web Tool */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Bebas+Neue&display=swap');

/* CSS Variables - Refined PornHub-Inspired Design System */
:root {
    /* Dark Theme - Primary Palette */
    --ph-black: #0E0E0E;           /* Primary surface */
    --ph-orange: #FF9000;          /* Primary accent */
    --accent-orange: #FF7F00;      /* Accent gradient */
    --on-surface-white: #FAFAFA;   /* Main text */
    --grey-700: #2B2B2B;           /* Secondary surface */
    --grey-500: #444444;           /* Secondary surface variant */
    
    /* Additional Dark Theme Colors */
    --grey-800: #1F1F1F;           /* Darker surface variant */
    --grey-600: #333333;           /* Medium grey */
    --grey-400: #666666;           /* Lighter grey */
    --grey-300: #888888;           /* Light text muted */
    
    /* Missing Variables - Now Defined */
    --primary-accent: var(--ph-orange);     /* Primary accent reference */
    --secondary-accent: var(--accent-orange); /* Secondary accent reference */
    --primary-dark: var(--ph-black);        /* Primary dark surface */
    --surface-dark: var(--grey-800);        /* Dark surface variant */
    
    /* Status Colors */
    --success-color: #10b981;       /* Success green */
    --error-color: #ef4444;         /* Error red */
    --warning-color: #f59e0b;       /* Warning amber */
    --info-color: var(--ph-orange); /* Info orange */
    
    /* 3-Depth Elevation Shadow Tokens */
    --elevation-1: 0 2px 8px rgba(0, 0, 0, 0.1);    /* Subtle elevation */
    --elevation-2: 0 8px 25px rgba(0, 0, 0, 0.15);  /* Medium elevation */
    --elevation-3: 0 16px 50px rgba(0, 0, 0, 0.25); /* High elevation */
    
    /* Spacing Scale */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    
    /* Border Radius Scale */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Typography Scale (rem based) */
    --font-size-xs: 0.75rem;       /* 12px */
    --font-size-sm: 0.875rem;      /* 14px */
    --font-size-base: 1rem;        /* 16px */
    --font-size-lg: 1.125rem;      /* 18px */
    --font-size-xl: 1.25rem;       /* 20px */
    --font-size-2xl: 1.5rem;       /* 24px */
    --font-size-3xl: 1.875rem;     /* 30px */
    --font-size-4xl: 2.25rem;      /* 36px */
    
    /* Line Height Scale */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 1.75;
    
    /* Font Stacks */
    --font-body: Inter, "Helvetica Neue", Arial, sans-serif;
    --font-logo: "Bebas Neue", cursive;
    --font-mono: "Consolas", "Monaco", monospace;
}

/* Light Theme - WCAG AA Compliant */
:root.light-theme {
    /* Light Theme - Primary Palette */
    --ph-black: #FFFFFF;            /* Light surface */
    --ph-orange: #EA580C;           /* WCAG AA compliant orange */
    --accent-orange: #DC2626;       /* WCAG AA compliant accent */
    --on-surface-white: #111827;    /* Dark text on light */
    --grey-700: #F8F8F8;            /* Light grey surface */
    --grey-500: #E5E7EB;            /* Light grey variant */
    
    /* Additional Light Theme Colors */
    --grey-800: #F3F4F6;            /* Lighter surface variant */
    --grey-600: #D1D5DB;            /* Light border */
    --grey-400: #9CA3AF;            /* Medium grey text */
    --grey-300: #6B7280;            /* Dark muted text */
    
    /* Light Theme Specific */
    --orange-600: #EA580C;          /* WCAG AA compliant primary orange */
    --orange-500: #F97316;          /* Secondary orange */
    --orange-100: #FED7AA;          /* Light orange background */
    --grey-100: #F8F8F8;            /* Light surface variant */
    --grey-50: #FAFAFA;             /* Lightest surface */
}

/* Logo Font Class */
.logo-font {
    font-family: var(--font-logo);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    background: linear-gradient(135deg, var(--ph-black) 0%, var(--grey-700) 50%, var(--ph-black) 100%);
    color: var(--on-surface-white);
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 400;
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 600;
    line-height: var(--line-height-tight);
    margin-bottom: 0.5rem;
    color: var(--on-surface-white);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: 500;
}

h6 {
    font-size: var(--font-size-base);
    font-weight: 500;
}

p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    margin-bottom: 1rem;
    color: var(--on-surface-white);
}

/* Logo Typography */
.logo,
.logo-text {
    font-family: var(--font-logo);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Body Text Variants */
.text-sm {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

.text-lg {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}

.text-xl {
    font-size: var(--font-size-xl);
    line-height: var(--line-height-relaxed);
}

/* Font Weight Utilities */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Monospace Text */
.font-mono {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

/* Glass Morphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

/* Card Components - Refactored with CSS Grid/Flex and Elevation Tokens */
.card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    backdrop-filter: blur(10px);
    box-shadow: var(--elevation-2);
    transition: all 0.3s ease;
    min-height: 200px;
    gap: var(--spacing-md);
}

.card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 153, 0, 0.2);
    transform: translateY(-2px) scale(1.03);
    box-shadow: var(--elevation-3);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--spacing-md);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary-accent);
    margin: 0;
}

.card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--grey-300);
    margin: 0;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
    min-height: 0; /* Allow shrinking */
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    margin-top: auto;
}

/* Card Variants */
.card-compact {
    padding: var(--spacing-md);
    min-height: 120px;
    box-shadow: var(--elevation-1);
}

.card-elevated {
    box-shadow: var(--elevation-3);
    transform: translateY(-4px);
}

.card-interactive:hover {
    cursor: pointer;
    box-shadow: var(--elevation-3);
    transform: translateY(-4px);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled::before {
    display: none;
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, var(--grey-800), var(--ph-orange));
    color: var(--on-surface-white);
    box-shadow: 0 4px 15px rgba(255, 144, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--ph-orange), var(--accent-orange));
    box-shadow: 0 8px 25px rgba(255, 144, 0, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--grey-700), var(--accent-orange));
    color: var(--on-surface-white);
    box-shadow: 0 4px 15px rgba(255, 127, 0, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--accent-orange), #e55a2b);
    box-shadow: 0 8px 25px rgba(255, 127, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--grey-800), var(--ph-orange));
    color: var(--on-surface-white);
    box-shadow: 0 4px 15px rgba(255, 144, 0, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, var(--ph-orange), var(--accent-orange));
    box-shadow: 0 8px 25px rgba(255, 144, 0, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--grey-800), var(--ph-orange));
    color: var(--on-surface-white);
    box-shadow: 0 4px 15px rgba(255, 144, 0, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--ph-orange), var(--accent-orange));
    box-shadow: 0 8px 25px rgba(255, 144, 0, 0.4);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--grey-300);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    font-family: var(--font-body);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(26, 26, 26, 0.7);
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: var(--on-surface-white);
    font-size: var(--font-size-sm);
    font-family: var(--font-body);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    background: rgba(26, 26, 26, 0.8);
    border-color: rgba(255, 153, 0, 0.3);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    background: rgba(26, 26, 26, 0.9);
    border-color: var(--ph-orange);
    box-shadow: 0 0 0 3px rgba(255, 144, 0, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
    font-style: italic;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: var(--font-mono);
    line-height: var(--line-height-normal);
}

.form-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='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Badge Components - Refactored with CSS Flex and Design Tokens */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-body);
    box-shadow: var(--elevation-1);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--elevation-2);
}

.badge-primary {
    background: rgba(255, 144, 0, 0.15);
    border: 1px solid rgba(255, 144, 0, 0.4);
    color: var(--primary-accent);
}

.badge-secondary {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.4);
    color: var(--secondary-accent);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--error-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--warning-color);
}

.badge-info {
    background: rgba(255, 153, 0, 0.15);
    border: 1px solid rgba(255, 153, 0, 0.4);
    color: var(--info-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--success-color);
}

.badge-vip {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #ffd700;
    animation: vipGlow 2s ease-in-out infinite alternate;
    box-shadow: var(--elevation-2);
}

/* Badge Sizes */
.badge-sm {
    padding: 2px var(--spacing-xs);
    font-size: calc(var(--font-size-xs) * 0.85);
    gap: 2px;
}

.badge-lg {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    gap: var(--spacing-sm);
}

@keyframes vipGlow {
    from { box-shadow: var(--elevation-1), 0 0 8px rgba(255, 215, 0, 0.4); }
    to { box-shadow: var(--elevation-2), 0 0 20px rgba(255, 215, 0, 0.8); }
}

/* Progress Bar - Refactored with CSS Flex and Design Tokens */
.progress {
    display: flex;
    align-items: center;
    width: 100%;
    height: 30px;
    background: rgba(26, 26, 26, 0.4);
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(5px);
    box-shadow: var(--elevation-1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--surface-dark), var(--primary-accent));
    border-radius: calc(var(--radius-lg) - 2px);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: progressShine 2s infinite;
}

/* Progress Bar Variants */
.progress-primary .progress-bar {
    background: linear-gradient(90deg, var(--surface-dark), var(--primary-accent));
}

.progress-success .progress-bar {
    background: linear-gradient(90deg, var(--surface-dark), var(--success-color));
}

.progress-danger .progress-bar {
    background: linear-gradient(90deg, var(--surface-dark), var(--error-color));
}

.progress-warning .progress-bar {
    background: linear-gradient(90deg, var(--surface-dark), var(--warning-color));
}

.progress-info .progress-bar {
    background: linear-gradient(90deg, var(--surface-dark), var(--info-color));
}

/* Progress Bar Sizes */
.progress-sm {
    height: 20px;
    border-radius: var(--radius-md);
}

.progress-sm .progress-bar {
    border-radius: calc(var(--radius-md) - 2px);
}

.progress-lg {
    height: 40px;
    border-radius: var(--radius-xl);
}

.progress-lg .progress-bar {
    border-radius: calc(var(--radius-xl) - 2px);
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--on-surface-white);
    font-weight: 600;
    font-size: var(--font-size-xs);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
    white-space: nowrap;
}

/* Animated progress for loading states */
.progress-animated .progress-bar {
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Modal Styles - Refactored with CSS Grid/Flex and Elevation Tokens */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
    /* Flexbox for centering */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
}

.modal-content {
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--surface-dark) 50%, var(--primary-dark) 100%);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--elevation-3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
    gap: var(--spacing-lg);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: var(--spacing-md);
}

.modal-title {
    color: var(--primary-accent);
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-2xl);
    cursor: pointer;
    padding: var(--spacing-xs);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: rotate(90deg);
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* Allow shrinking */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

/* Modal Variants */
.modal-sm .modal-content {
    max-width: 400px;
}

.modal-lg .modal-content {
    max-width: 800px;
}

.modal-xl .modal-content {
    max-width: 1200px;
}

.modal-fullscreen .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: 20px;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }

/* Flex System */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }

/* Result Panels */
.result-panel {
    background: rgba(26, 26, 26, 0.4);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.result-panel.live {
    border: 2px solid rgba(255, 153, 0, 0.3);
    background: rgba(255, 153, 0, 0.05);
}

.result-panel.live:hover {
    border-color: rgba(255, 153, 0, 0.5);
    background: rgba(255, 153, 0, 0.08);
    transform: translateY(-2px);
}

.result-panel.dead {
    border: 2px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.result-panel.dead:hover {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
    transform: translateY(-2px);
}

.result-panel.error {
    border: 2px solid rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.result-panel.error:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
    transform: translateY(-2px);
}

.result-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.4;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    backdrop-filter: blur(5px);
}

.result-content.live {
    color: var(--primary-accent);
    border: 1px solid rgba(255, 153, 0, 0.3);
}

.result-content.dead {
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.result-content.error {
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 153, 0, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 153, 0, 0.5);
}

::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shimmer Animation - Optimized for 60fps performance */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.animate-fadeIn { animation: fadeIn 0.5s ease; }
.animate-slideInUp { animation: slideInUp 0.5s ease; }
.animate-slideInDown { animation: slideInDown 0.5s ease; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Loading States */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-accent);
    font-weight: 500;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 153, 0, 0.3);
    border-top: 2px solid var(--primary-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    max-width: 350px;
    word-wrap: break-word;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInDown 0.3s ease;
}

/* Multi-Tab Modal Styles */
.multi-tab-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.multi-tab-modal-content {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    border-radius: 20px;
    padding: 0;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.multi-tab-modal .modal-header {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    border-bottom: none;
}

.multi-tab-modal .modal-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.multi-tab-modal .modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.multi-tab-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.multi-tab-modal .modal-content-body {
    padding: 25px;
    text-align: center;
    line-height: 1.6;
}

.multi-tab-modal .modal-content-body p {
    margin: 0 0 15px 0;
    font-size: 15px;
}

.multi-tab-modal .warning-text {
    color: #fbbf24;
    font-weight: bold;
    font-size: 14px;
    margin-top: 10px;
}

.multi-tab-modal .modal-actions {
    padding: 0 25px 25px 25px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.multi-tab-modal .modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.multi-tab-modal .modal-btn.primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-accent));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

.multi-tab-modal .modal-btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-accent), #cc7700);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.4);
}

.multi-tab-modal .modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.multi-tab-modal .modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Enhanced Gate-Down Styling */
.gate-down {
    color: #fbbf24 !important;
    opacity: 0.6 !important;
    background: rgba(251, 191, 36, 0.1) !important;
    cursor: not-allowed !important;
    position: relative;
}

.gate-down::after {
    content: '🚧';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.8;
}

/* Enhanced VIP-Locked Styling */
.vip-locked {
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    color: #6b7280 !important;
    background: rgba(75, 85, 99, 0.3) !important;
    position: relative;
}

.vip-locked::after {
    content: '🔒';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.8;
}

/* Light Theme - Grey + Light Orange Design (WCAG AA Compliant) */
:root {
    --light-primary: #4b5563;     /* Darker Grey for better contrast */
    --light-accent: #ea580c;      /* Darker Orange for better contrast */
    --light-accent-bg: #fed7aa;   /* Light Orange background */
    --light-bg: #f8fafc;         /* Light Grey Background */
    --light-surface: #ffffff;    /* White Surface */
    --light-text: #111827;       /* Darker text for better contrast */
    --light-text-muted: #4b5563; /* Darker muted text */
    --light-border: #e5e7eb;     /* Light Border */
}

/* Light theme base styles */
body.light-theme {
    background: linear-gradient(135deg, var(--light-bg) 0%, #e2e8f0 50%, var(--light-bg) 100%);
    color: var(--light-text);
}

/* Light theme card styles */
body.light-theme .card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--light-border);
}

body.light-theme .card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(251, 146, 60, 0.3);
}

/* Light theme form elements */
body.light-theme .form-input,
body.light-theme .form-select,
body.light-theme .form-textarea {
    background: var(--light-surface);
    border: 2px solid var(--light-border);
    color: var(--light-text);
}

body.light-theme .form-input:hover,
body.light-theme .form-select:hover,
body.light-theme .form-textarea:hover {
    background: var(--light-surface);
    border-color: rgba(251, 146, 60, 0.5);
}

body.light-theme .form-input:focus,
body.light-theme .form-select:focus,
body.light-theme .form-textarea:focus {
    outline: none;
    background: var(--light-surface);
    border-color: var(--light-accent);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

body.light-theme .form-label {
    color: var(--light-text-muted);
}

body.light-theme .form-input::placeholder,
body.light-theme .form-textarea::placeholder {
    color: #9ca3af;
}

/* Light theme buttons */
body.light-theme .btn-primary {
    background: linear-gradient(135deg, var(--light-primary), var(--light-accent));
    color: white;
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.3);
}

body.light-theme .btn-primary:hover {
    background: linear-gradient(135deg, var(--light-accent), #ea580c);
    box-shadow: 0 8px 25px rgba(251, 146, 60, 0.4);
}

body.light-theme .btn-secondary {
    background: linear-gradient(135deg, var(--light-primary), var(--light-accent));
    color: white;
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.3);
}

body.light-theme .btn-secondary:hover {
    background: linear-gradient(135deg, var(--light-accent), #ea580c);
    box-shadow: 0 8px 25px rgba(251, 146, 60, 0.4);
}

body.light-theme .btn-info,
body.light-theme .btn-success {
    background: linear-gradient(135deg, var(--light-primary), var(--light-accent));
    color: white;
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.3);
}

body.light-theme .btn-info:hover,
body.light-theme .btn-success:hover {
    background: linear-gradient(135deg, var(--light-accent), #ea580c);
    box-shadow: 0 8px 25px rgba(251, 146, 60, 0.4);
}

/* Light theme badges */
body.light-theme .badge-primary,
body.light-theme .badge-secondary,
body.light-theme .badge-info,
body.light-theme .badge-success {
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.3);
    color: #ea580c;
}

/* Light theme progress bars */
body.light-theme .progress {
    background: rgba(229, 231, 235, 0.6);
    border: 2px solid var(--light-border);
}

body.light-theme .progress-bar {
    background: linear-gradient(90deg, var(--light-primary), var(--light-accent));
}

/* Light theme result panels */
body.light-theme .result-panel {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--light-border);
}

body.light-theme .result-panel.live {
    border: 2px solid rgba(251, 146, 60, 0.4);
    background: rgba(251, 146, 60, 0.08);
}

body.light-theme .result-panel.live:hover {
    border-color: rgba(251, 146, 60, 0.6);
    background: rgba(251, 146, 60, 0.12);
}

body.light-theme .result-content {
    background: rgba(248, 250, 252, 0.9);
    color: var(--light-text-muted);
}

body.light-theme .result-content.live {
    color: #ea580c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

/* Light theme scrollbars */
body.light-theme ::-webkit-scrollbar-track {
    background: rgba(229, 231, 235, 0.5);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.4);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.6);
}

/* Light theme glass effects */
body.light-theme .glass {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

body.light-theme .glass-dark {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

/* Light theme modal styles */
body.light-theme .modal {
    background-color: rgba(0, 0, 0, 0.4);
}

body.light-theme .modal-content {
    background: linear-gradient(135deg, var(--light-surface) 0%, #f8fafc 50%, var(--light-surface) 100%);
    border: 1px solid var(--light-border);
    color: var(--light-text);
}

body.light-theme .modal-title {
    color: var(--light-accent);
}

body.light-theme .modal-close {
    color: var(--light-text-muted);
}

body.light-theme .modal-close:hover {
    background: rgba(107, 114, 128, 0.1);
    color: var(--light-text);
}

/* Light theme focus styles */
body.light-theme .btn:focus,
body.light-theme .form-input:focus,
body.light-theme .form-select:focus,
body.light-theme .form-textarea:focus {
    outline: 2px solid var(--light-accent);
    outline-offset: 2px;
}

/* Light theme selection styles */
body.light-theme ::selection {
    background: rgba(251, 146, 60, 0.3);
    color: var(--light-text);
}

body.light-theme ::-moz-selection {
    background: rgba(251, 146, 60, 0.3);
    color: var(--light-text);
}

/* Light theme notifications */
body.light-theme .notification-success {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.9), rgba(234, 88, 12, 0.9));
}

body.light-theme .notification-info {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.9), rgba(234, 88, 12, 0.9));
}

/* Light theme enhancements for gate states */
body.light-theme .gate-down {
    color: #d97706 !important;
    background: rgba(251, 191, 36, 0.15) !important;
}

body.light-theme .vip-locked {
    color: #9ca3af !important;
    background: rgba(209, 213, 219, 0.3) !important;
}

.notification-success {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.9), rgba(204, 119, 0, 0.9));
}

.notification-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
}

.notification-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9));
}

.notification-info {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.9), rgba(204, 119, 0, 0.9));
}

/* Responsive Design - Updated Breakpoints: 1024px, 768px, 480px */
@media (max-width: 1024px) {
    /* Grid adjustments for tablets */
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
    
    /* Tablet-specific padding adjustments */
    .card {
        padding: var(--spacing-lg); /* 24px */
    }
    
    .modal-content {
        padding: var(--spacing-lg); /* 24px */
        margin: 8% auto;
        width: 92%;
    }
    
    /* Typography scaling for tablets */
    h1 { font-size: calc(var(--font-size-4xl) * 0.9); }
    h2 { font-size: calc(var(--font-size-3xl) * 0.9); }
    h3 { font-size: calc(var(--font-size-2xl) * 0.9); }
    
    .notification {
        top: var(--spacing-md);
        right: var(--spacing-md);
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    /* Font scaling for mobile */
    body {
        font-size: calc(var(--font-size-base) * 0.9); /* 14.4px */
    }
    
    /* Typography scaling */
    h1 { font-size: calc(var(--font-size-4xl) * 0.75); /* ~27px */ }
    h2 { font-size: calc(var(--font-size-3xl) * 0.8); /* ~24px */ }
    h3 { font-size: calc(var(--font-size-2xl) * 0.85); /* ~20.4px */ }
    h4 { font-size: calc(var(--font-size-xl) * 0.9); /* ~18px */ }
    h5 { font-size: var(--font-size-lg); /* 18px */ }
    h6 { font-size: var(--font-size-base); /* 16px */ }
    
    /* Padding adjustments */
    .card {
        padding: var(--spacing-md); /* 16px */
        border-radius: var(--radius-md); /* 12px */
        gap: var(--spacing-sm); /* 8px */
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg); /* 8px 24px */
        font-size: calc(var(--font-size-sm) * 0.95); /* ~13.3px */
        min-width: 100px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: var(--spacing-lg); /* 24px */
        width: 95%;
        gap: var(--spacing-md); /* 16px */
    }
    
    .badge {
        padding: calc(var(--spacing-xs) * 0.75) var(--spacing-sm); /* 3px 8px */
        font-size: calc(var(--font-size-xs) * 0.9); /* ~10.8px */
    }
    
    .progress {
        height: 24px; /* Smaller progress bars */
    }
    
    .progress-text {
        font-size: calc(var(--font-size-xs) * 0.9); /* ~10.8px */
    }
    
    /* Grid system adjustments */
    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .flex {
        flex-direction: column;
    }
    
    .flex.responsive-row {
        flex-direction: row;
    }
    
    /* Notification adjustments */
    .notification {
        top: var(--spacing-sm); /* 8px */
        right: var(--spacing-sm); /* 8px */
        left: var(--spacing-sm); /* 8px */
        max-width: none;
        font-size: calc(var(--font-size-sm) * 0.9); /* ~12.6px */
    }
    
    /* Form elements scaling */
    .form-input,
    .form-select,
    .form-textarea {
        padding: var(--spacing-sm) var(--spacing-md); /* 8px 16px */
        font-size: calc(var(--font-size-sm) * 0.95); /* ~13.3px */
    }
    
    .form-label {
        font-size: calc(var(--font-size-sm) * 0.9); /* ~12.6px */
    }
}

@media (max-width: 480px) {
    /* Aggressive font scaling for small mobile */
    body {
        font-size: calc(var(--font-size-base) * 0.85); /* ~13.6px */
    }
    
    /* Typography scaling for small screens */
    h1 { font-size: calc(var(--font-size-3xl) * 0.8); /* ~24px */ }
    h2 { font-size: calc(var(--font-size-2xl) * 0.85); /* ~20.4px */ }
    h3 { font-size: calc(var(--font-size-xl) * 0.9); /* ~18px */ }
    h4 { font-size: var(--font-size-lg); /* 18px */ }
    h5 { font-size: var(--font-size-base); /* 16px */ }
    h6 { font-size: calc(var(--font-size-sm) * 1.1); /* ~15.4px */ }
    
    /* Compact padding for small screens */
    .card {
        padding: calc(var(--spacing-sm) + 2px); /* 10px */
        border-radius: var(--radius-sm); /* 8px */
        gap: var(--spacing-xs); /* 4px */
        min-height: 120px;
    }
    
    .card-header,
    .card-footer {
        padding-top: var(--spacing-sm); /* 8px */
        padding-bottom: var(--spacing-sm); /* 8px */
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-md); /* 4px 16px */
        font-size: calc(var(--font-size-xs) * 1.1); /* ~13.2px */
        min-width: 80px;
        border-radius: var(--radius-sm); /* 8px */
    }
    
    .modal-content {
        margin: 5% auto;
        padding: var(--spacing-md); /* 16px */
        gap: var(--spacing-sm); /* 8px */
    }
    
    .modal-header {
        padding-bottom: var(--spacing-sm); /* 8px */
    }
    
    .modal-footer {
        padding-top: var(--spacing-sm); /* 8px */
    }
    
    .badge {
        padding: 2px var(--spacing-xs); /* 2px 4px */
        font-size: calc(var(--font-size-xs) * 0.8); /* ~9.6px */
    }
    
    .progress {
        height: 20px; /* Even smaller progress bars */
    }
    
    .progress-text {
        font-size: calc(var(--font-size-xs) * 0.8); /* ~9.6px */
    }
    
    /* Form elements for small screens */
    .form-input,
    .form-select,
    .form-textarea {
        padding: calc(var(--spacing-xs) + 2px) var(--spacing-sm); /* 6px 8px */
        font-size: calc(var(--font-size-sm) * 0.9); /* ~12.6px */
        border-radius: var(--radius-sm); /* 8px */
    }
    
    .form-label {
        font-size: calc(var(--font-size-sm) * 0.85); /* ~11.9px */
        margin-bottom: var(--spacing-xs); /* 4px */
    }
    
    .form-group {
        margin-bottom: var(--spacing-md); /* 16px */
    }
    
    /* Notification adjustments */
    .notification {
        padding: var(--spacing-sm) var(--spacing-md); /* 8px 16px */
        font-size: calc(var(--font-size-sm) * 0.85); /* ~11.9px */
        border-radius: var(--radius-sm); /* 8px */
    }
    
    /* Grid spacing adjustments */
    .grid {
        gap: var(--spacing-sm); /* 8px */
    }
    
    /* Utility spacing adjustments */
    .p-3 { padding: var(--spacing-sm); } /* Override to smaller padding */
    .p-4 { padding: var(--spacing-md); } /* Override to smaller padding */
    .p-5 { padding: var(--spacing-lg); } /* Override to smaller padding */
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .btn {
        display: none;
    }
    
    .modal {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #ffffff;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        border: 2px solid #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility - Enhanced with focus-visible */
.btn:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

/* Focus-visible for better keyboard navigation */
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.modal-close:focus-visible,
.theme-toggle:focus-visible,
a:focus-visible {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
    box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.3);
}

/* Remove default focus for mouse users, keep for keyboard */
.btn:focus:not(:focus-visible),
.form-input:focus:not(:focus-visible),
.form-select:focus:not(:focus-visible),
.form-textarea:focus:not(:focus-visible) {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 144, 0, 0.15);
}

/* Selection Styles */
::selection {
    background: rgba(255, 153, 0, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(255, 153, 0, 0.3);
    color: #ffffff;
}
