/* Register Page - Modern PC Optimized Design */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--g-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated background - Different from login */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(40, 167, 69, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(32, 201, 151, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 20% 20%, rgba(23, 162, 184, 0.3) 0%, transparent 50%);
    animation: backgroundPulse 25s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.7; }
    33% { transform: scale(1.1) rotate(1deg); opacity: 0.9; }
    66% { transform: scale(0.9) rotate(-1deg); opacity: 0.8; }
}

/* Main register container - Wider for more fields */
.register-container {
    display: flex;
    width: 92vw;
    max-width: 1400px;
    height: 85vh;
    min-height: 700px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 2;
    animation: slideInScale 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Left panel - Branding (similar to login but green theme) */
.register-brand-panel {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #28a745, #20c997);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.register-brand-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/><circle cx="25" cy="25" r="10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/><circle cx="75" cy="75" r="15" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    background-size: 80px 80px;
    animation: circleFloat 35s linear infinite;
}

@keyframes circleFloat {
    0% { transform: translateX(0) translateY(0) rotate(0deg); }
    100% { transform: translateX(80px) translateY(80px) rotate(360deg); }
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    animation: spin 3s ease-in-out infinite;
}

@keyframes spin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.05); }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    line-height: 1.6;
    max-width: 350px;
    margin-bottom: 40px;
}

.brand-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 320px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.step-item:hover {
    transform: translateX(5px);
}

.step-number {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Right panel - Register form (wider) */
.register-form-panel {
    flex: 1;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 85vh;
}

.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.form-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.form-subtitle {
    color: #64748b;
    font-size: 1rem;
    font-weight: 400;
}

/* Enhanced form layout with grid */
.register-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.label-icon {
    font-size: 1rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
    transform: translateY(-1px);
}

.form-input:hover, .form-select:hover {
    border-color: #28a745;
}

/* Enhanced input with icons */
.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 5;
}

.input-with-icon .form-input {
    padding-left: 50px;
}

.input-with-icon .form-input:focus + .input-icon {
    color: #28a745;
}

/* Password strength indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e1e8ed;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #dc3545, #ffc107, #28a745);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.8rem;
    margin-top: 5px;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Role selection enhancement */
.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.role-option {
    position: relative;
    cursor: pointer;
}

.role-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.role-card {
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(40, 167, 69, 0.1), transparent);
    transition: left 0.5s;
}

.role-card:hover::before {
    left: 100%;
}

.role-card:hover {
    transform: translateY(-3px);
    border-color: #28a745;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
}

.role-radio:checked + .role-card {
    border-color: #28a745;
    background: linear-gradient(145deg, #d4edda, #c3e6cb);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.role-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.role-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.role-description {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

/* Submit button */
.submit-btn {
    grid-column: 1 / -1;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.submit-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: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Loading state */
.submit-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Login link */
.login-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.login-link p {
    color: #64748b;
    margin-bottom: 15px;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid #28a745;
    border-radius: 10px;
    color: #28a745;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Enhanced validation styles */
.form-input.error, .form-select.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
}

.form-input.success, .form-select.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1) !important;
}

.validation-message {
    font-size: 0.85rem;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    animation: fadeIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 6px;
}

.validation-message.error {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.validation-message.success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Progress indicator */
.form-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 0;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-step.active {
    color: #28a745;
}

.progress-step.completed {
    color: #28a745;
}

.step-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e1e8ed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: #28a745;
    color: white;
}

.progress-step.completed .step-circle {
    background: #28a745;
    color: white;
}

/* Responsive design */
@media (max-width: 1200px) {
    .register-container {
        width: 95vw;
        height: auto;
        min-height: 600px;
        flex-direction: column;
    }

    .register-brand-panel {
        flex: none;
        padding: 30px 20px;
    }

    .brand-steps {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .register-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .role-selection {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .register-container {
        margin: 10px;
        width: calc(100vw - 20px);
    }

    .register-form-panel {
        padding: 30px 20px;
    }

    .brand-title {
        font-size: 2rem;
    }

    .form-title {
        font-size: 1.8rem;
    }

    .step-item {
        padding: 10px 15px;
    }

    .role-card {
        padding: 15px;
    }
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators */
.submit-btn:focus,
.login-btn:focus,
.role-card:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}
