/* static/css/register.css - Registration Page Styles */

:root {
    --transition-speed: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #000000;
    min-height: 100vh;
    display: flex;
    overflow-x: auto;
    overflow-y: auto;
}

.register-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-width: 320px;
    overflow-x: auto;
    overflow-y: auto;
}

/* Left Panel - Branding (White) */
.brand-panel {
    flex: 0.8;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    position: relative;
    overflow: auto;
    animation: fadeIn 0.8s var(--transition-speed) ease-out forwards;
    opacity: 0;
    min-width: 250px;
}

/* Animated Gradient Aurora Effect */
.brand-panel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(200, 200, 200, 0.1), rgba(255, 255, 255, 0) 60%);
    animation: rotateBackground 20s linear infinite;
    transform-origin: center;
}

.brand-content {
    text-align: center;
    max-width: 450px;
    z-index: 1;
}

.kairos-logo {
    width: 350px;
    height: auto;
    margin: 0 auto 16px;
    filter: none;
}

.brand-subtitle {
    font-size: 18px;
    color: #000000;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Right Panel - Register Form (Black, Larger) */
.form-panel {
    flex: 1.2;
    background: linear-gradient(145deg, #000000, #1a1a1a);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    animation: slideIn 0.8s var(--transition-speed) ease-out forwards;
    opacity: 0;
    transform: translateX(50px);
    overflow: auto;
    min-width: 300px;
}

.form-container {
    width: 100%;
    max-width: 400px;
    min-width: 280px;
}

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

.form-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.form-subtitle {
    font-size: 16px;
    color: #ffffff;
    font-weight: 400;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: #222222;
    border: 2px solid #444444;
    border-radius: 12px;
    font-size: 16px;
    color: #ffffff;
    transition: all var(--transition-speed) ease;
    outline: none;
}

.form-input::placeholder {
    color: #888888;
}

.form-input:focus {
    border-color: #ffffff;
    background: #333333;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-speed) ease;
}

.password-toggle:hover {
    color: #ffffff;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-meter {
    height: 4px;
    background: #333333;
    border-radius: 2px;
    margin: 4px 0;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all var(--transition-speed) ease;
}

.strength-weak { background: #ef4444; }
.strength-medium { background: #f59e0b; }
.strength-strong { background: #10b981; }

.strength-text {
    color: #888888;
    margin-top: 4px;
}

/* Terms Checkbox */
.terms-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.terms-checkbox {
    width: 18px;
    height: 18px;
    background: #333333;
    border: 2px solid #555555;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-speed) ease;
}

.terms-checkbox:checked {
    background: #ffffff;
    border-color: #ffffff;
}

.terms-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000000;
    font-weight: bold;
    font-size: 12px;
}

.terms-text {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
}

.terms-text a {
    color: #ffffff;
    text-decoration: underline;
    transition: color var(--transition-speed) ease;
}

.terms-text a:hover {
    color: #cccccc;
}

/* Register Button */
.register-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, #ffffff, #e0e0e0);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.register-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
    background: linear-gradient(to right, #ffffff, #f0f0f0);
}

.register-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    color: #ffffff;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #666666, transparent);
}
.divider::before { background: linear-gradient(to left, transparent, #666666, transparent); }

.divider span {
    padding: 0 16px;
    font-weight: 500;
    color: #ffffff;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: linear-gradient(145deg, #333333, #1a1a1a);
    border: 1px solid #555555;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    border-color: #777777;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.google-icon, .apple-icon {
    width: 22px;
    height: 22px;
    color: #ffffff;
}

/* Sign In Link */
.signin-link {
    text-align: center;
    color: #ffffff;
    font-size: 14px;
}

.signin-link a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed) ease;
}

.signin-link a:hover {
    text-decoration: underline;
    color: #cccccc;
}

/* Error/Success Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    display: none;
    animation: fadeIn 0.5s ease;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ff6b6b;
}

.success-message {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

/* Loading State */
.register-btn.loading {
    position: relative;
    color: transparent;
}

.register-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000000;
    animation: spin 0.8s linear infinite;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.1);
}

/* Keyframe Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes rotateBackground {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .brand-panel {
        flex: 0.7;
    }

    .form-panel {
        flex: 1.3;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .register-container {
        flex-direction: column;
        min-height: auto;
    }

    .brand-panel {
        min-height: 25vh;
        max-height: 30vh;
        padding: 30px 20px;
        text-align: center;
        flex: none;
    }
    
    .brand-panel::before {
        width: 300%;
        height: 300%;
    }

    .form-panel {
        min-height: 75vh;
        animation: none;
        opacity: 1;
        transform: none;
        flex: none;
        padding: 25px 20px;
    }

    .kairos-logo {
        width: 180px;
    }

    .brand-subtitle {
        font-size: 16px;
    }

    .form-container {
        max-width: 100%;
        padding: 0 10px;
    }

    .form-title {
        font-size: 32px;
    }

    .form-subtitle {
        font-size: 15px;
    }

    .form-label {
        font-size: 11px;
    }

    .form-input {
        padding: 14px 18px;
        font-size: 15px;
    }

    .register-btn {
        padding: 14px;
        font-size: 15px;
    }

    .password-strength {
        font-size: 11px;
    }

    .terms-text {
        font-size: 13px;
    }

    .divider {
        margin: 24px 0;
        font-size: 13px;
    }

    .social-btn {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .brand-panel {
        min-height: 20vh;
        padding: 20px 15px;
    }

    .kairos-logo {
        width: 150px;
    }

    .brand-subtitle {
        font-size: 14px;
    }

    .form-panel {
        padding: 20px 15px;
        min-height: 80vh;
    }

    .form-header {
        margin-bottom: 25px;
    }

    .form-title {
        font-size: 28px;
    }

    .form-subtitle {
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-input {
        padding: 13px 16px;
        font-size: 14px;
    }

    .password-toggle {
        right: 12px;
    }

    .register-btn {
        padding: 13px;
        font-size: 14px;
    }

    .social-buttons {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 24px;
    }

    .social-btn {
        width: 100%;
    }

    .terms-group {
        gap: 10px;
        margin-bottom: 20px;
    }

    .terms-text {
        font-size: 12px;
    }

    .terms-checkbox {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .divider {
        margin: 18px 0;
    }

    .signin-link {
        font-size: 13px;
    }

    .message {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .brand-panel {
        min-height: 18vh;
    }

    .kairos-logo {
        width: 130px;
    }

    .form-title {
        font-size: 24px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 13px;
    }

    .register-btn {
        padding: 12px;
        font-size: 13px;
    }

    .strength-meter {
        height: 3px;
    }

    .terms-text {
        font-size: 11px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
    }

    .form-container {
        max-width: 600px;
    }

    .form-header {
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }
}
