:root {
    /* Color Palette */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #8b5cf6;
    --bg-color: #f8fafc;
    --surface-color: rgba(255, 255, 255, 0.85);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --focus-ring: rgba(79, 70, 229, 0.3);
    --error-color: #ef4444;
    --success-color: #10b981;

    /* Layout styling */
    --border-radius-lg: 16px;
    --border-radius-md: 8px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Animation */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
    opacity: 0.6;
}

.shape-1 {
    background-color: var(--primary-color);
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    background-color: var(--secondary-color);
    width: 500px;
    height: 500px;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    background-color: #38bdf8;
    width: 300px;
    height: 300px;
    top: 30%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -50px) scale(1.1);
    }

    100% {
        transform: translate(-30px, 50px) scale(0.9);
    }
}

/* Main Container - Glassmorphism */
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: fadeUp 0.8s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-main), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Form Styles */
.application-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-section {
    border: none;
    padding: 0;
    margin: 0;
}

.form-section legend {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    width: 100%;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.form-row.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 24px;
}

label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.required {
    color: var(--error-color);
}

.field-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Inputs */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition-fast);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-ring);
    background-color: #ffffff;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    font-weight: 400;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload {
    position: relative;
    width: 100%;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: rgba(255, 255, 255, 0.5);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(238, 242, 255, 0.5);
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-display {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    pointer-events: none;
}

.file-icon {
    font-size: 2rem;
}

.file-name {
    font-weight: 500;
    color: var(--text-muted);
}

.file-hint {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Submit Button */
.form-actions {
    margin-top: 10px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit svg {
    transition: transform var(--transition-fast);
}

.btn-submit:hover svg {
    transform: translateX(4px);
}

/* Utility Animations */
.auto-filled {
    animation: flash 1s ease;
}

@keyframes flash {
    0% {
        background-color: rgba(16, 185, 129, 0.2);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.7);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 24px;
        border-radius: 20px;
    }

    .form-row,
    .form-row.three-cols {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .btn-submit {
        width: 100%;
    }
}

/* Captcha Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-question {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 2px;
    user-select: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.captcha-group input {
    max-width: 150px;
}

.error-border {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2) !important;
}