/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #ffffff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(239, 68, 68, 0.1) 0%, 
        rgba(220, 38, 38, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(239, 68, 68, 0.05) 75%,
        rgba(220, 38, 38, 0.1) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Container */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    animation: slideInDown 0.8s ease-out;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-container img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ef4444;
    margin: 0;
    letter-spacing: 1px;
}

.logo-text p {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 25%;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.progress-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form Container */
.form-container {
    flex: 1;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.multi-step-form {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-height: 400px;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.form-step.active {
    display: block;
}

.step-content {
    margin-bottom: 40px;
}

.step-header {
    text-align: center;
    margin-bottom: 30px;
}

.step-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
    animation: pulse 2s infinite;
}

.step-icon i {
    font-size: 1.5rem;
    color: white;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.step-header p {
    color: #666;
    font-size: 1rem;
}

/* Input Groups */
.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.input-group input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    transform: translateY(-2px);
}

.input-group input.error {
    border-color: #ef4444;
    animation: shake 0.5s ease-in-out;
}

.input-validation {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #ef4444;
    min-height: 20px;
}

/* Radio Groups */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-option {
    position: relative;
}

.radio-option input {
    display: none;
}

.radio-option label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.radio-option label i {
    font-size: 1.2rem;
    color: #ccc;
    transition: all 0.3s ease;
}

.radio-option input:checked + label {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.2);
}

.radio-option input:checked + label i {
    color: #ef4444;
}

/* Buttons */
.step-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-height: 50px;
    justify-content: center;
}

.btn-next, .btn-submit {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    flex: 1;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-next:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
}

.btn-prev {
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    border: 2px solid #e5e7eb;
    flex: 0.8;
}

.btn-prev:hover {
    background: #f9fafb;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInUp 0.8s ease-out;
}

.success-message.show {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounceIn 0.8s ease-out;
}

.success-icon i {
    font-size: 2rem;
    color: white;
}

.success-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.success-content p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ef4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .logo-container {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .multi-step-form {
        padding: 30px 20px;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
    }
    
    .step-icon i {
        font-size: 1.2rem;
    }
    
    .step-header h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .btn-prev {
        flex: 1;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 10px;
    }
    
    .multi-step-form {
        padding: 25px 15px;
    }
    
    .input-group input {
        padding: 12px 15px;
    }
    
    .radio-option label {
        padding: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .multi-step-form {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .step-header h2 {
        color: #f9fafb;
    }
    
    .step-header p {
        color: #d1d5db;
    }
    
    .input-group label {
        color: #f9fafb;
    }
    
    .input-group input {
        background: rgba(55, 55, 55, 0.8);
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .radio-option label {
        background: rgba(55, 55, 55, 0.8);
        color: #f9fafb;
        border-color: #4b5563;
    }
}
