/* Base Styles and Typography */
:root {
    --primary-bg: #0f172a;      /* Slate 900 */
    --secondary-bg: #1e293b;    /* Slate 800 */
    --accent-color: #3b82f6;    /* Blue 500 */
    --accent-hover: #2563eb;    /* Blue 600 */
    --text-primary: #f8fafc;    /* Slate 50 */
    --text-secondary: #94a3b8;  /* Slate 400 */
    --error-color: #ef4444;     /* Red 500 */
    --success-color: #10b981;   /* Emerald 500 */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.5);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic Background Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.4) 0%, rgba(30,58,138,0) 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(16,185,129,0.25) 0%, rgba(6,78,59,0) 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 30%;
    left: 40%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, rgba(76,29,149,0) 70%);
    animation-duration: 25s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, 10%) scale(0.9); }
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 800px;
    z-index: 10;
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Glassmorphism Form */
.glass-form {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.form-section:last-of-type {
    margin-bottom: 2rem;
    border-bottom: none;
    padding-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.step-number {
    background: var(--accent-color);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.form-section h2 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.5px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: -1rem 0 1.5rem 2.75rem;
}

/* Form Grid & Inputs */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

input, select {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input:focus + label, input:not(:placeholder-shown) + label {
    color: var(--accent-color);
}

/* Custom Select Dropdown */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\25BC';
    position: absolute;
    top: 50%;
    right: 1.2rem;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-secondary);
    pointer-events: none;
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

select option {
    background: var(--secondary-bg);
    color: #fff;
    padding: 10px;
}

/* Validation Styles */
.error-message {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.4rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: var(--transition);
    position: absolute;
    bottom: -1.25rem;
    left: 0;
}

.form-group.has-error input, .form-group.has-error select {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.form-group.has-error .error-message {
    opacity: 1;
    transform: translateY(0);
}

/* Submit Button */
.form-actions {
    margin-top: 2rem;
}

.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1.2rem;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
}

.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Spinner */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading .loader {
    display: block !important;
}

/* Status Message */
.status-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    animation: fadeIn 0.3s ease-out;
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-form {
        padding: 2rem 1.5rem;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .form-section {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}
