/* Main application styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Typography scale */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */
    --text-7xl: 4.5rem;      /* 72px */
    --text-8xl: 6rem;        /* 96px */
    
    /* Font families */
    --font-display: 'Roboto Flex', 'Roboto', sans-serif;
    --font-body: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    --font-mono: 'Roboto Mono', 'Consolas', monospace;
    
    /* Colors */
    --primary: #FF2A00;
    --primary-dark: #CC2200;
    --primary-light: #FF5533;
    --primary-lighter: #FF8566;
    --background: #1d1f27;
    --background-dark: #0a0c10;
    --surface: #252830;
    --surface-variant: #2d3039;
    --on-primary: #FFFFFF;
    --on-background: #E1E3E8;
    --on-surface: rgba(255, 255, 255, 0.87);
    --text-primary: rgba(255, 255, 255, 0.98);
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    
    /* Spacing scale */
    --space-xs: 0.25rem;     /* 4px */
    --space-sm: 0.5rem;      /* 8px */
    --space-md: 1rem;        /* 16px */
    --space-lg: 1.5rem;      /* 24px */
    --space-xl: 2rem;        /* 32px */
    --space-2xl: 3rem;       /* 48px */
    --space-3xl: 4rem;       /* 64px */
    --space-4xl: 6rem;       /* 96px */
    --space-5xl: 8rem;       /* 128px */
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 8px 32px rgba(255, 42, 0, 0.4);
    --shadow-primary-lg: 0 16px 48px rgba(255, 42, 0, 0.5);
}

html, body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--on-surface);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1d1f27;
}

::-webkit-scrollbar-thumb {
    background-color: #FF2A00;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF5533;
}

html, body, .mud-layout, html body * {
    scrollbar-color: #FF2A00 #1d1f27;
    scrollbar-width: thin;
}

/* Utility classes */
.gradient-bg {
    background: linear-gradient(135deg, #FF2A00 0%, #FF5533 100%);
}

.text-gradient {
    background: linear-gradient(135deg, #FF2A00 0%, #FF8566 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Container adjustments */
.mud-container {
    padding-left: 24px;
    padding-right: 24px;
}

/* Card styles */
.mud-card {
    border-radius: 12px;
}

/* Button styles */
.mud-button-root {
    text-transform: none;
    font-weight: 500;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #FF2A00;
    color: white;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    display: none;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: white;
}

/* Loading indicator */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #FF2A00;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    animation: loading-progress-stroke 2s ease-in-out infinite;
}

@keyframes loading-progress-stroke {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Responsive utilities */
@media (max-width: 600px) {
    .mud-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Centralized Hero Animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-animated {
    background: linear-gradient(135deg, rgba(255, 42, 0, 0.1) 0%, rgba(29, 31, 39, 0.9) 100%);
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}