/* Modern H5 Login Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 400px;
    position: relative;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}



/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 32px;
}

.welcome-section h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-section .subtitle {
    font-size: 16px;
    color: #64748b;
    font-weight: 400;
    line-height: 1.5;
}

/* Form Styles */
.form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    position: relative;
}

.input-group input:not(.phone-input) {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    background: #ffffff;
    color: #1a202c;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.input-group input:not(.phone-input):focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.input-group input:not(.phone-input)::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Phone Input */
.phone-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.phone-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.country-code {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 16px 12px;
    font-size: 16px;
    font-weight: 600;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
    user-select: none;
}

.phone-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 20px;
    color: #1a202c;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    text-indent: 0;
}

.phone-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #64748b;
}

.password-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.eye-icon {
    font-size: 18px;
}

/* Button Styles */
.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

/* Links */
.forgot-password-section {
    text-align: center;
    margin: -8px 0 8px 0;
}

.forgot-password-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.forgot-password-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.register-section {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.register-text {
    color: #64748b;
    font-size: 14px;
}

.register-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.register-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Messages */
#error-container,
#success-container {
    margin-bottom: 20px;
}

.error-message {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #fca5a5;
    animation: slideDown 0.3s ease;
}

.success-message {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #86efac;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OTP Styles */
.otp-container {
    text-align: center;
    margin: 24px 0;
}

.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.otp-input {
    width: 48px !important;
    height: 56px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    background: white;
    color: #1a202c;
}

.otp-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
}

.otp-input.filled {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: #667eea !important;
    color: #667eea;
}

.timer {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
}

.resend-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.resend-btn:hover:not(:disabled) {
    color: #5a67d8;
}

.resend-btn:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: none;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 8px;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.inactive {
    background: #e2e8f0;
    color: #94a3b8;
}

.step.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.step.completed {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.step-connector {
    width: 40px;
    height: 2px;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.step-connector.completed {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* Checkbox Styles */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkmark.checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.checkmark.checked::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: fadeInUp 0.6s ease;
}

/* Enhanced Input States */
.input-group input.valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1) !important;
}

.input-group input.invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.input-group input.weak {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1) !important;
}

.input-group input.medium {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.input-group input.strong {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1) !important;
}

/* Field Feedback */
.field-feedback {
    position: absolute;
    bottom: -28px;
    left: 0;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 10;
    white-space: nowrap;
}

.field-feedback.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.field-feedback.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.field-feedback.warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.field-feedback.info {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .main-content {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .welcome-section h1 {
        font-size: 24px;
    }
    
    .input-group input {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .btn {
        padding: 14px 20px;
    }
    
    .otp-input {
        width: 44px !important;
        height: 52px;
        font-size: 18px;
    }
    
    .otp-inputs {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .otp-input {
        width: 40px !important;
        height: 48px;
        font-size: 16px;
    }
    
    .otp-inputs {
        gap: 6px;
    }
}