* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Flash Messages - Centered at Top */
.flash-messages {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.alert {
    padding: 15px 40px 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.4s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: bold;
    opacity: 0.5;
    line-height: 1;
}

.close-btn:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Register Container */
.register-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

fieldset {
    background: none;
    border: none;
    box-shadow: none;
}



/* Left Side - Image/Branding */
.register-branding {
    background: linear-gradient(rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    background-size: cover;
    background-position: center;
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.brand-logo i {
    font-size: 2rem;
}

.brand-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.brand-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.brand-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.brand-footer {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Right Side - Form */
.register-form-section {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 90vh;
    overflow-y: auto;
}

.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #666;
}

.form-header a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.form-header a:hover {
    text-decoration: underline;
}

/* Social Register */
.social-register {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.social-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.social-btn i {
    font-size: 1.2rem;
}

.social-btn.google i {
    color: #db4437;
}

.social-btn.facebook i {
    color: #4267B2;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #999;
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    padding: 0 1rem;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #555;
    font-weight: 600;
    font-size: 0.85rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.password-toggle,
.toggle-password,
.show-password-btn,
.input-group-text i,
.fa-eye,
.fa-eye-slash {
    font-size: 14px; 
    width: 20px;
    height: 20px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #667eea;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    color: #666;
}

.strength-weak { background: #e74c3c; width: 33%; }
.strength-medium { background: #f39c12; width: 66%; }
.strength-strong { background: #27ae60; width: 100%; }

/* Terms Checkbox */
.terms-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0;
}

.terms-group input[type="checkbox"] {
    margin-top: 0.3rem;
    cursor: pointer;
}

.terms-group label {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.terms-group a {
    color: #667eea;
    text-decoration: none;
}

.terms-group a:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn i {
    margin-right: 0.5rem;
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Benefits List */
.benefits-list {
    list-style: none;
    margin-top: 1rem;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.benefits-list i {
    color: #27ae60;
}

/* Back to Home */
.back-home {
    text-align: center;
    margin-top: 0.8rem;
}

.back-home a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.back-home a:hover {
    color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .register-container {
        grid-template-columns: 1fr;
    }

    .register-branding {
        display: none;
    }

    .register-form-section {
        padding: 2rem;
        max-height: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .register-form-section {
        padding: 1.5rem;
    }

    .social-register {
        flex-direction: column;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }
}