@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: hsl(354, 75%, 50%);
    /* Sophisticated Red */
    --primary-dark: hsl(354, 75%, 40%);
    --secondary: hsl(0, 0%, 15%);
    /* Dark Gray/Black */
    --accent: hsl(354, 100%, 65%);
    --bg: hsl(0, 0%, 5%);
    --surface: hsl(0, 0%, 8%);
    --surface-light: hsl(0, 0%, 12%);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CSS Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: var(--spacing-xl) 0;
    }
}

/* UI Components */
.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(227, 27, 35, 0.4);
}

.btn-outline {
    border: 1px solid var(--surface-light);
    color: var(--text-primary);
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition-normal);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.glass-card {
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: var(--spacing-md);
    transition: var(--transition-normal);
}

.glass-card:hover {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(227, 27, 35, 0.3);
    transform: translateY(-5px);
}

/* Animations & Effects */
.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-background {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(227, 27, 35, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

/* Base Utility */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

/* In-View Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-in {
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Blazor Specific Fixes */
#blazor-error-ui {
    background: var(--accent);
    color: white;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.3);
    display: none;
    left: 0;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.loading-progress {
    position: relative;
    display: block;
    width: 100px;
    height: 100px;
    margin: 40vh auto 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--surface-light);
    stroke-width: 8px;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}