/* auth.css - Sci-Fi Authentication Interface */

/* ============================================================================
/* FONT IMPORT (Managed in common_base.css)
/* ============================================================================ */

/* ============================================================================
/* BASE STYLES
/* ============================================================================ */

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

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: #050810;
    background-image: 
        radial-gradient(circle at 50% 30%, #1a253a 0%, #050810 80%),
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 50px 50px, 50px 50px;
    background-attachment: fixed;
    color: #e0e6ed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================================================
/* LOGIN FORM
/* ============================================================================ */

.login-container {
    background: rgba(13, 18, 30, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 243, 255, 0.3);
    padding: 40px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
    width: 100%;
    max-width: 550px;
    text-align: center;
    position: relative;
    clip-path: polygon(
        20px 0, 
        100% 0, 
        100% calc(100% - 20px), 
        calc(100% - 20px) 100%, 
        0 100%, 
        0 20px
    );
}

/* Tech-Corner accents */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border-top: 2px solid #00f3ff;
    border-left: 2px solid #00f3ff;
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-bottom: 2px solid #00f3ff;
    border-right: 2px solid #00f3ff;
}

.login-header {
    margin-bottom: 30px;
}

.login-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, #00f3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.login-subtitle {
    font-family: 'Rajdhani', sans-serif;
    color: #8b9bb4;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9em;
    color: #00f3ff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.form-input:focus {
    outline: none;
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    background: rgba(0, 243, 255, 0.05);
}

.btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    color: #00f3ff;
    border: 1px solid #00f3ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    text-shadow: 0 0 8px #00f3ff;
    transform: translateY(-2px);
    color: #fff;
}

.btn:disabled {
    border-color: #8b9bb4;
    color: #8b9bb4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================================
/* LINKS
/* ============================================================================ */

.auth-links {
    margin-top: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-links a {
    color: #8b9bb4;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-links a:hover {
    color: #00f3ff;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
}

/* ============================================================================
/* ERROR MESSAGES
/* ============================================================================ */

.alert {
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.alert-danger, .error {
    background: rgba(255, 42, 42, 0.1);
    border: 1px solid rgba(255, 42, 42, 0.3);
    color: #ff2a2a;
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.1);
}

.alert-success, .success {
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
    color: #00ff9d;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.1);
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}

/* ============================================================================
/* ANIMATIONS
/* ============================================================================ */

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

.login-container {
    animation: slideIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ============================================================================
/* REGISTER SPECIFIC
/* ============================================================================ */

.register-container {
    /* Inherits mostly from login-container via HTML structure, but if specific class is used: */
    @extend .login-container;
    max-width: 550px;
}

.password-requirements {
    font-size: 0.85em;
    color: #8b9bb4;
    margin-top: 8px;
    text-align: left;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid #8b9bb4;
}

.field-error {
    color: #ff2a2a;
    font-size: 0.85em;
    margin-top: 5px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 5px;
}

.field-error::before {
    content: '!';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #ff2a2a;
    color: #000;
    text-align: center;
    border-radius: 50%;
    font-size: 12px;
    line-height: 16px;
    font-weight: bold;
}

/* ============================================================================
/* VERSION
/* ============================================================================ */

.version {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    letter-spacing: 2px;
}

/* ============================================================================
/* RESPONSIVE
/* ============================================================================ */

@media (max-width: 768px) {
    .login-container {
        padding: 30px 20px;
        margin: 10px;
        clip-path: none;
        border-radius: 4px;
    }
    
    .login-title {
        font-size: 2em;
    }
}

/* Stars Animation */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
    pointer-events: none;
}

.stars::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 80px 10px, white, transparent),
        radial-gradient(2px 2px at 130px 80px, white, transparent),
        radial-gradient(1px 1px at 110px 120px, white, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: stars 120s linear infinite;
    opacity: 0.3;
}

@keyframes stars {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

/* Checkbox Styles */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.checkbox-container:hover {
    color: rgba(255, 255, 255, 1);
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #00d4ff;
    border-color: #00d4ff;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    left: 2px;
    top: -2px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label {
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00d4ff;
    flex-shrink: 0;
}

/* Password Toggle */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Social Login */
.social-login {
    margin-top: 30px;
    text-align: center;
}

.social-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.social-divider::before,
.social-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.social-divider span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
}

.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8em;
    font-style: italic;
}

/* Registration Specific */
.form-help {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.username-status, .email-status {
    margin-top: 8px;
    font-size: 0.85em;
    min-height: 20px;
}

.status-text.checking { color: #ffc107; }
.status-text.available { color: #4eff4a; }
.status-text.unavailable { color: #ff5722; }
.status-text.unavailable.protected {
    color: #ff6b6b;
    font-weight: 600;
    background: rgba(255, 107, 107, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.username-suggestions, .email-suggestions {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.suggestions-label {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: 500;
}

.suggestion-item {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ffc107;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85em;
}

.suggestion-item:hover {
    background: rgba(255, 193, 7, 0.2);
    transform: translateX(5px);
}

.password-strength-container { margin-top: 10px; }
.password-strength-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}
.password-strength-fill { height: 100%; width: 0%; transition: all 0.3s ease; border-radius: 3px; }
.password-strength-fill.very-weak { background: #ff5722; width: 20%; }
.password-strength-fill.weak { background: #ff9800; width: 40%; }
.password-strength-fill.medium { background: #ffc107; width: 60%; }
.password-strength-fill.strong { background: #4eff4a; width: 80%; }
.password-strength-text { font-size: 0.85em; color: rgba(255, 255, 255, 0.8); margin-bottom: 10px; }

.password-requirements { display: flex; flex-wrap: wrap; gap: 10px; }
.requirement { display: flex; align-items: center; gap: 5px; font-size: 0.75em; color: rgba(255, 255, 255, 0.6); }
.requirement.met { color: #4eff4a; }

.password-match { font-size: 0.85em; margin-top: 5px; min-height: 20px; }
.password-match.valid { color: #4eff4a; }
.password-match.invalid { color: #ff5722; }

/* Forgot Password Demo Info */
.demo-info {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(0, 212, 255, 0.3);
}
.demo-info h4 { color: #00d4ff; margin: 0 0 10px 0; font-size: 1.1em; }
.demo-link { background: rgba(0, 0, 0, 0.3); padding: 10px; border-radius: 5px; margin: 10px 0; word-break: break-all; }
.demo-link code { color: #4eff4a; font-family: 'Courier New', monospace; font-size: 0.9em; }
.demo-note { color: rgba(255, 255, 255, 0.7); font-size: 0.85em; font-style: italic; margin: 10px 0 0 0; }

/* Logout Specific */
.logout-info {
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.info-icon {
    font-size: 1.2em;
}

.info-text {
    color: rgba(255, 255, 255, 0.9);
}

.auth-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 550px;
    width: 100%;
    text-align: center;
    margin: 0 auto;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-title {
    font-size: 2em;
    font-weight: 700;
    background: linear-gradient(45deg, #00d4ff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    font-style: italic;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}
