/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;700&display=swap');

:root {
    /* Premium Light Palette */
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --secondary-color: #0ea5e9;
    /* Sky 500 */
    --accent-color: #f59e0b;
    /* Amber 500 */

    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);

    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-color: #e2e8f0;
    /* Slate 200 */

    /* Shadows & Glows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #4338ca;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
    border-radius: 1rem;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    filter: brightness(1.1);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
    margin: 0 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(79, 70, 229, 0.05);
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(79, 70, 229, 0.3);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
}

/* Hero Section */
.hero-section {
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-text-fill-color: initial !important;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

/* Utilities */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-light-gradient {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }
}

/* Custom Reconnect Modal Styles */
#components-reconnect-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease-in-out;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-refused {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

#components-reconnect-modal>div {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

#components-reconnect-modal p {
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.1rem;
}

#components-reconnect-modal a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

#components-reconnect-modal a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

/* Custom Error UI Styles */
#blazor-error-ui {
    background: #fee2e2;
    /* Red 100 */
    border-top: 1px solid #ef4444;
    /* Red 500 */
    color: #991b1b;
    /* Red 800 */
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.8rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-weight: 500;
    text-align: center;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #991b1b;
    font-size: 1.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#blazor-error-ui .dismiss:hover {
    opacity: 1;
}

#blazor-error-ui .reload {
    margin-left: 0.5rem;
    color: #ef4444;
    font-weight: 700;
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}