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

:root {
    /* Modern Fitness Theme Colors */
    --bg-primary: #000000;
    --bg-secondary: #0f1419;
    --bg-card: rgba(15, 20, 25, 0.95);
    --bg-hero: linear-gradient(135deg, #ff4757 0%, #ff6b35 25%, #00d4aa 75%, #0099ff 100%);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-hero: #ffffff;
    --accent-primary: linear-gradient(135deg, #ff4757 0%, #ff6b35 100%);
    --accent-hover: linear-gradient(135deg, #ff3742 0%, #ff5722 100%);
    --accent-light: #ff8c5a;
    --accent-secondary: #00d4aa;
    --accent-tertiary: #0099ff;
    --success: #00d4aa;
    --error: #ff4757;
    --warning: #ffa726;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --glow-orange: rgba(255, 107, 53, 0.4);
    --glow-blue: rgba(0, 153, 255, 0.4);
    --glow-green: rgba(0, 212, 170, 0.4);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(0, 153, 255, 0.1) 0%, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-size: var(--font-size-base);
    font-weight: 400;
    overflow-x: hidden;
    padding-bottom: var(--spacing-3xl);
}

/* Background with blur effect */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top left, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        var(--bg-primary);
    z-index: -1;
}

/* Hero Section */
.hero-section {
    background: var(--bg-hero);
    padding: var(--spacing-3xl) var(--spacing-lg) calc(var(--spacing-3xl) * 2) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 75vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('https://images.unsplash.com/photo-1554284126-aa88f22d8b74?w=1200&h=800&fit=crop&auto=format') center/cover,
        linear-gradient(135deg, rgba(255, 71, 87, 0.85) 0%, rgba(255, 107, 53, 0.8) 25%, rgba(0, 212, 170, 0.8) 75%, rgba(0, 153, 255, 0.85) 100%);
    z-index: -1;
    animation: heroGlow 4s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { filter: brightness(1) saturate(1.2); }
    100% { filter: brightness(1.1) saturate(1.4); }
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: var(--spacing-lg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 8px 32px rgba(0, 0, 0, 0.2));
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { 
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 8px 32px rgba(255, 107, 53, 0.3));
    }
    100% { 
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 8px 32px rgba(0, 212, 170, 0.4));
    }
}

.hero-subtitle {
    font-size: var(--font-size-3xl);
    color: rgba(255, 255, 255, 0.98);
    margin-bottom: var(--spacing-2xl);
    font-weight: 700;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-transform: capitalize;
}

.hero-description {
    font-size: var(--font-size-2xl);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    max-width: 580px;
    line-height: 1.5;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
    margin-bottom: var(--spacing-2xl);
}

.hero-image {
    flex: 0 0 auto;
    display: none;
}

.hero-img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* Container */
.container {
    max-width: 600px;
    margin: -2rem auto var(--spacing-3xl);
    padding: 0 var(--spacing-lg);
    position: relative;
    z-index: 3;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-bottom: var(--spacing-xl);
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 107, 53, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-secondary) 20%, 
        var(--accent-light) 50%, 
        var(--accent-tertiary) 80%, 
        transparent
    );
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    opacity: 0.8;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.4; transform: scaleX(0.8); }
    50% { opacity: 0.8; transform: scaleX(1); }
}

.card h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-2xl);
    color: var(--text-primary);
    text-align: center;
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Unit Toggle */
.unit-toggle-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.unit-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
}

.unit-btn {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: calc(var(--radius-lg) - 6px);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
    font-weight: 500;
    font-family: inherit;
    position: relative;
}

.unit-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.unit-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Imperial Height Inputs */
.imperial-height {
    display: flex;
    gap: var(--spacing-sm);
}

.imperial-height input {
    flex: 1;
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    gap: var(--spacing-sm);
}

.label-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-light);
    flex-shrink: 0;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: var(--spacing-lg);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    background: rgba(15, 20, 25, 0.8);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 56px;
    backdrop-filter: blur(20px);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Select dropdown styling */
.form-group select {
    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='%238b5cf6' 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;
    cursor: pointer;
}

.form-group select option {
    background-color: #13192a;
    color: #ffffff;
    padding: var(--spacing-md);
    border: none;
    font-family: inherit;
    font-size: var(--font-size-base);
}

.form-group select option:hover {
    background-color: #1e2a3a;
}

.form-group select option:checked {
    background-color: var(--accent-light);
    color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-light);
    background: rgba(15, 20, 25, 0.9);
    box-shadow: 
        0 0 0 4px var(--glow-orange),
        inset 0 2px 8px rgba(0, 0, 0, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--border-light);
    background: rgba(255, 255, 255, 0.07);
}

.form-group input:invalid,
.form-group select:invalid {
    border-color: var(--error);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-help {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

.error-message {
    color: var(--error);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    min-height: 1.2em;
}

/* Advanced Section */
.advanced-section {
    margin-top: var(--spacing-2xl);
}

.advanced-toggle {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-base);
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.advanced-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.advanced-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.advanced-toggle:hover::before {
    opacity: 1;
}

.advanced-toggle.expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.advanced-toggle.expanded::before {
    opacity: 0;
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: var(--font-size-lg);
}

.advanced-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.advanced-content.expanded {
    max-height: 600px;
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-3xl) var(--spacing-xl);
}

/* Button Group */
.button-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
}

@media (min-width: 480px) {
    .button-group {
        flex-direction: row;
        gap: var(--spacing-lg);
    }
    
    .button-group .calculate-btn,
    .button-group .reset-btn {
        flex: 1;
    }
}

/* Buttons */
.calculate-btn,
.recalculate-btn,
.reset-btn {
    padding: var(--spacing-lg) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-xl);
    font-size: var(--font-size-base);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 60px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.calculate-btn,
.recalculate-btn {
    width: 100%;
    background: var(--accent-primary);
    color: white;
    box-shadow: 
        0 8px 24px var(--glow-orange),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

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

.calculate-btn:hover::before,
.recalculate-btn:hover::before {
    left: 100%;
}

.reset-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.2), rgba(0, 212, 170, 0.2));
    color: var(--text-primary);
    border: 1px solid rgba(0, 153, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 24px var(--glow-blue),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.calculate-btn:hover,
.recalculate-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 32px var(--glow-orange),
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px) scale(1.02);
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.3), rgba(0, 212, 170, 0.3));
    box-shadow: 
        0 12px 32px var(--glow-blue),
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.calculate-btn:active,
.recalculate-btn:active,
.reset-btn:active {
    transform: translateY(0);
}

.recalculate-btn {
    margin-top: var(--spacing-xl);
}

/* Results Card */
.results-card {
    animation: slideUpFade 0.6s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered animations for result items */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.result-section h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--accent-primary);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.result-item.highlighted {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(102, 126, 234, 0.1));
    border: 1px solid var(--accent-light);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.result-label {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.result-value {
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
}

/* Macro Items */
.macro-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.macro-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary));
    opacity: 0.7;
}

.macro-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.macro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.macro-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.macro-grams {
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--accent-primary);
}

.macro-calories {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Chart Container */
.chart-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-xl);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.chart-container canvas {
    max-width: 320px;
    height: auto !important;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Legal Pages Styling */
.back-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-hover);
}

.legal-content {
    line-height: 1.7;
}

.legal-content h2 {
    color: var(--accent-primary);
    font-size: var(--font-size-xl);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.legal-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.legal-content ul {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
    color: var(--text-secondary);
}

.legal-content li {
    margin-bottom: var(--spacing-xs);
}

.legal-content strong {
    color: var(--text-primary);
}

.last-updated {
    color: var(--text-muted);
    font-style: italic;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xl) !important;
}

/* 404 Error Page */
.error-content {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.error-content h2 {
    color: var(--accent-primary);
    margin-bottom: var(--spacing-md);
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.error-actions {
    margin-top: var(--spacing-xl);
}

/* Footer */
.footer {
    margin-top: auto;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border);
}

.footer-content {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.footer-links {
    margin-top: var(--spacing-sm);
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-primary);
}

/* Responsive Design */
@media (min-width: 768px) {
    .hero-section {
        padding: var(--spacing-3xl) var(--spacing-2xl);
    }
    
    .hero-image {
        display: block;
        margin-left: var(--spacing-2xl);
    }
    
    .hero-logo {
        max-width: 320px;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-2xl);
    }
    
    .hero-description {
        font-size: var(--font-size-xl);
    }
    
    .container {
        max-width: 700px;
        padding: 0 var(--spacing-xl);
        margin-top: -6rem;
    }
    
    .results-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }
    
    .card {
        padding: var(--spacing-3xl);
    }
}

@media (min-width: 1024px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .container {
        max-width: 900px;
    }
}

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

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1a1a1a;
        --bg-card: #2a2a2a;
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --border: #666666;
        --accent-primary: #66b3ff;
    }
    
    .form-group select option {
        background-color: #1a1a1a;
        color: #ffffff;
    }
}

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