/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Premium Dark Theme */
    --bg-gradient-start: #0a0f1e;
    --bg-gradient-end: #0b1120;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-highlight: rgba(255, 255, 255, 0.02);
    --text-primary: #ffffff;
    --text-secondary: #a0a8c0;
    --text-muted: #6c7a96;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --error: #ef4444;
    --success: #10b981;
    --input-bg: rgba(255, 255, 255, 0.02);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-hover: rgba(255, 255, 255, 0.05);
    --dropdown-bg: #1a1f2e;
    --dropdown-hover: #6366f1;
    --dropdown-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --glow-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
    animation: premiumGlow 12s ease-in-out infinite;
}

@keyframes premiumGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #c0c8ff 50%, #a0a8c0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.header p::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 0.2s both;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.step.active {
    color: var(--accent);
}

.step.completed {
    color: var(--success);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 2px solid var(--input-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.step.active .step-number {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.step.completed .step-number {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--glass-bg);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(5px);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #8b5cf6, #c084fc);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism Form Container */
.form-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 3rem;
    box-shadow: var(--card-shadow), var(--glow-shadow);
    animation: scaleIn 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Form Sections */
.form-section {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6, transparent);
    border-radius: 4px;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 0.7rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.required::after {
    content: '*';
    color: var(--accent);
    margin-left: 4px;
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
textarea:hover {
    background: var(--input-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: rgba(255, 255, 255, 0.05);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== FIXED PREMIUM DROPDOWNS - NOW VISIBLE ===== */
/* Keep original select accessible but hide it visually */
select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Premium dropdown container - VISIBLE */
.custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
    display: block; /* Ensure it's visible */
}

/* Premium trigger button - VISIBLE */
.select-selected {
    background: linear-gradient(135deg, #1a1f2e, #151a28);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
    display: flex !important; /* Force display */
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    width: 100%;
    min-height: 60px;
}

.select-selected:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, #1e2438, #1a1f2e);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.select-selected:after {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--accent);
    transition: all 0.3s ease;
    margin-left: 10px;
}

.select-selected.active:after {
    transform: rotate(180deg);
}

.select-selected span {
    color: #ffffff;
    font-weight: 500;
    flex: 1;
}

/* Premium dropdown panel - VISIBLE when active */
.select-items {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1f2e, #151a28);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    display: none; /* Hidden by default */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(20px);
}

.select-items.show {
    display: block !important; /* Show when active */
}

/* Premium option items - VISIBLE */
.select-item {
    padding: 1.2rem 1.5rem;
    color: #a0a8c0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 500;
    display: block; /* Ensure visibility */
}

.select-item:last-child {
    border-bottom: none;
}

.select-item:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #ffffff;
    padding-left: 2rem;
}

.select-item.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    color: #ffffff;
    font-weight: 600;
    border-left: 3px solid var(--accent);
}

/* Scrollbar */
.select-items::-webkit-scrollbar {
    width: 8px;
}

.select-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.select-items::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 4px;
}

/* File Upload */
.file-upload {
    position: relative;
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    backdrop-filter: blur(10px);
}

.file-upload:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.file-upload i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.file-upload p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 2.5rem;
    padding: 1rem 0;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 0.8rem;
    accent-color: var(--accent);
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3.5rem;
    gap: 1.5rem;
}

.btn {
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: white;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.loading-overlay .spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-left-color: var(--accent);
    border-right-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 4rem;
    animation: scaleIn 0.5s ease-out;
}

.success-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--success), #34d399);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem;
    font-size: 4rem;
    color: white;
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

.success-message h2 {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, var(--success), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.success-message p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .form-card {
        padding: 2rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 1rem 2rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 1.5rem;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .progress-steps {
        display: none;
    }
}