/**
 * Auth Module Styles
 * KOLO UI v1.0 - Cyber Glow Edition
 * 
 * Features:
 * - Glassmorphism effects
 * - Smooth animations
 * - Password strength indicator
 * - Live validation
 * - Responsive design
 * - Dark theme optimized
 */

/* ===============================================
   Auth Page Layout
   =============================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

/* ===============================================
   Auth Card
   =============================================== */

.auth-card {
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 120, 0, 0.1);
    animation: authCardFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   Brand / Logo
   =============================================== */

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    color: #ff7800;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.auth-logo svg {
    filter: drop-shadow(0 0 12px rgba(255, 120, 0, 0.4));
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 120, 0, 0.3);
}

.auth-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ===============================================
   Alerts
   =============================================== */

.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    animation: alertSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.alert-icon {
    font-size: 20px;
    line-height: 1;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #ffffff;
}

.alert-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

/* ===============================================
   Form
   =============================================== */

.auth-form {
    margin-bottom: 24px;
}

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

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-label.required .label-text::after {
    content: '*';
    color: #ff7800;
    margin-left: 4px;
}

.label-icon {
    font-size: 16px;
    opacity: 0.6;
}

.form-control-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    padding-left: 44px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-control:focus {
    border-color: rgba(255, 120, 0, 0.5);
    background: rgba(30, 30, 40, 0.8);
    box-shadow: 
        0 0 0 4px rgba(255, 120, 0, 0.1),
        0 0 20px rgba(255, 120, 0, 0.2);
}

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-control-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 120, 0, 0.6);
    pointer-events: none;
}

.form-control-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-control-toggle:hover {
    color: rgba(255, 120, 0, 0.8);
}

.form-control-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-loading {
    animation: statusSpin 1s linear infinite;
    color: rgba(255, 120, 0, 0.6);
}

@keyframes statusSpin {
    to { transform: rotate(360deg); }
}

.status-success {
    color: #4caf50;
}

.status-error {
    color: #f44336;
}

.form-hint {
    margin-top: 6px;
    font-size: 13px;
    min-height: 18px;
    transition: all 0.3s;
}

.form-hint.hint-success {
    color: #4caf50;
}

.form-hint.hint-error {
    color: #f44336;
}

.form-hint.hint-neutral {
    color: rgba(255, 255, 255, 0.5);
}

.form-help {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

.form-help code {
    background: rgba(255, 120, 0, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #ff7800;
}

/* ===============================================
   Form Row (Remember Me + Forgot Password)
   =============================================== */

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #ff7800;
}

.checkbox-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.form-link {
    font-size: 14px;
    color: #ff7800;
    text-decoration: none;
    transition: color 0.2s;
}

.form-link:hover {
    color: #ff9933;
    text-decoration: underline;
}

/* ===============================================
   Password Strength Indicator
   =============================================== */

.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: #f44336;
}

.strength-fill.medium {
    width: 66%;
    background: #ff9800;
}

.strength-fill.strong {
    width: 100%;
    background: #4caf50;
}

.strength-text {
    font-size: 12px;
    font-weight: 500;
}

.strength-text.weak {
    color: #f44336;
}

.strength-text.medium {
    color: #ff9800;
}

.strength-text.strong {
    color: #4caf50;
}

/* ===============================================
   Sex Selector
   =============================================== */

.sex-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sex-option {
    cursor: pointer;
}

.sex-option input[type="radio"] {
    display: none;
}

.sex-card {
    padding: 20px;
    background: rgba(30, 30, 40, 0.6);
    border: 2px solid rgba(255, 120, 0, 0.2);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.sex-option:hover .sex-card {
    border-color: rgba(255, 120, 0, 0.4);
    transform: translateY(-2px);
}

.sex-option input:checked + .sex-card {
    background: rgba(255, 120, 0, 0.15);
    border-color: #ff7800;
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.3);
}

.sex-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.sex-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

/* ===============================================
   Register Progress
   =============================================== */

.register-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.progress-step.active {
    opacity: 1;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.progress-step.active .progress-dot {
    background: #ff7800;
    box-shadow: 0 0 12px rgba(255, 120, 0, 0.6);
}

.progress-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.progress-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

/* ===============================================
   Register Steps
   =============================================== */

.register-step {
    animation: stepFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.register-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.register-nav .btn-secondary {
    flex: 0 0 auto;
}

.register-nav .btn-primary:not(.btn-block) {
    flex: 1;
}

/* ===============================================
   Buttons
   =============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #ff7800, #ff5500);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 120, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 120, 0, 0.5);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-block {
    width: 100%;
}

.btn-loader {
    display: inline-flex;
}

.spinner {
    animation: buttonSpin 1s linear infinite;
}

@keyframes buttonSpin {
    to { transform: rotate(360deg); }
}

/* ===============================================
   OAuth Buttons
   =============================================== */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.oauth-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-oauth {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.btn-oauth:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-oauth:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===============================================
   Auth Footer
   =============================================== */

.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.auth-link {
    color: #ff7800;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #ff9933;
    text-decoration: underline;
}

/* ===============================================
   Background Decoration
   =============================================== */

.auth-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-bg-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 120, 0, 0.15), transparent);
    filter: blur(60px);
    animation: bgFloat 20s ease-in-out infinite;
}

.auth-bg-circle-1 {
    width: 400px;
    height: 400px;
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.auth-bg-circle-2 {
    width: 500px;
    height: 500px;
    bottom: -250px;
    left: -250px;
    animation-delay: -7s;
}

.auth-bg-circle-3 {
    width: 350px;
    height: 350px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes bgFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* ===============================================
   Responsive
   =============================================== */

@media (max-width: 640px) {
    .auth-page {
        padding: 16px;
    }
    
    .auth-card {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .oauth-buttons {
        grid-template-columns: 1fr;
    }
    
    .sex-selector {
        grid-template-columns: 1fr;
    }
    
    .register-nav {
        flex-direction: column;
    }
    
    .register-nav .btn-secondary,
    .register-nav .btn-primary:not(.btn-block) {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }
    
    .progress-label {
        font-size: 10px;
    }
}
