/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Theming */
/* Dark theme is default */
:root {
    --primary-color: #3B2540;
    --primary-light: #876F8C;
    --primary-dark: #2a1a2d;
    --accent-color: #6b7f5e;
    --gradient-start: #2d1f33;
    --gradient-middle: #3B2540;
    --gradient-end: #5a3d5f;
    
    --bg-color: #111113;
    --bg-secondary: #1a1a1e;
    --text-color: #e4e4e7;
    --text-secondary: #a1a1aa;
    --border-color: #27272a;
    --card-bg: #18181b;
    --header-bg: rgba(17, 17, 19, 0.92);
    --footer-bg: #09090b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.light-theme {
    --bg-color: #ffffff;
    --bg-secondary: #f4f4f5;
    --text-color: #18181b;
    --text-secondary: #52525b;
    --border-color: #e4e4e7;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: #18181b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    border: none;
    outline: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Fluent UI Component Overrides */
fluent-design-theme {
    display: contents;
    border: none !important;
    outline: none !important;
}

fluent-design-theme::part(content) {
    border: none !important;
}

h1:focus,
h2:focus,
h3:focus {
    outline: none;
    border: none;
    box-shadow: none;
    -webkit-appearance: none;
}

h1:focus-visible,
h2:focus-visible,
h3:focus-visible {
    outline: none;
    border: none;
    box-shadow: none;
}

fluent-card {
    --card-background-color: var(--card-bg);
    --card-foreground-color: var(--text-color);
}

/* Form Validation Styles */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Loading Progress */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--primary-color);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--text-color);
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}
