:root {
    --primary-dark: #074569;
    --gradient-start: #386eb5;
    --gradient-end: #65c3d2;
    --text-light: #d0d7e0;
    --background: #0a0a0a;
    --surface: #1a1a1a;
    --font-primary: 'Poppins', sans-serif;
}

html,
body {
    font-family: var(--font-primary);
    background-color: var(--background);
    color: var(--text-light);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Animated particle background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(56, 110, 181, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(101, 195, 210, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(56, 110, 181, 0.05) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Glassmorphism effect for containers */
.container,
.card,
.contact-card,
.hero-content {
    position: relative;
    z-index: 1;
}

/* Smooth page entrance */
main,
.page-wrapper {
    animation: pageEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced links */
a,
.btn-link {
    color: var(--gradient-end);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover::after {
    width: 100%;
}

a:hover,
.btn-link:hover {
    color: var(--gradient-start);
    transform: translateY(-1px);
}

/* Smooth headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Animated gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced buttons with shine effect */
.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(56, 110, 181, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 110, 181, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Card enhancements with stagger animation */
.card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cardEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card:nth-child(1) {
    animation-delay: 0.05s;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.15s;
}

.card:nth-child(4) {
    animation-delay: 0.2s;
}

.card:nth-child(5) {
    animation-delay: 0.25s;
}

.card:nth-child(6) {
    animation-delay: 0.3s;
}

.card:nth-child(7) {
    animation-delay: 0.35s;
}

.card:nth-child(8) {
    animation-delay: 0.4s;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(56, 110, 181, 0.2);
    border-color: rgba(101, 195, 210, 0.2);
}

/* Improved spacing */
.container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

section {
    padding: 4rem 0;
}

/* Text improvements */
p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.15rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Form inputs with glassmorphism */
.form-control {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-light);
    padding: 0.875rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 3px rgba(56, 110, 181, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: rgba(208, 215, 224, 0.4);
}

/* Smooth transitions for all interactive elements */
button,
input,
textarea,
select,
a {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 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;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    section {
        padding: 2.5rem 0;
    }

    .btn-primary {
        padding: 0.75rem 1.5rem;
    }
}