/* TalkNow - Authentication Styles */

/* CSS Variables */
:root {
    --bg: #000000;
    --text: #FFFFFF;
    --text-secondary: #CCCCCC;
    --text-muted: #888888;
    --accent: #00AEEF;
    --accent-hover: #0099D6;
    --accent-yellow: #FFD700;
    --surface: #1a1a1a;
    --surface-light: #2a2a2a;
    --surface-lighter: #3a3a3a;
    --border: #333333;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --shadow: rgba(0, 0, 0, 0.5);
}

/* Reset ve Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

/* Auth Container */
.auth-container {
    max-width: 420px;
    width: 100%;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Auth Header */
.auth-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    border-bottom: 1px solid var(--border);
}

.logo-container {
    margin-bottom: 20px;
}

.auth-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form Container */
.auth-form-container {
    padding: 30px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #51cf66;
}

/* Form Styles */
.auth-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    font-size: 16px;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    background: var(--surface-lighter);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--accent);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.strength-weak {
    background: rgba(220, 53, 69, 0.1);
    color: #ff6b7a;
}

.strength-fair {
    background: rgba(255, 193, 7, 0.1);
    color: #ffd43b;
}

.strength-good {
    background: rgba(255, 193, 7, 0.1);
    color: #fab005;
}

.strength-strong {
    background: rgba(40, 167, 69, 0.1);
    color: #51cf66;
}

/* Password Match Indicator */
.password-match {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.match-success {
    background: rgba(40, 167, 69, 0.1);
    color: #51cf66;
}

.match-error {
    background: rgba(220, 53, 69, 0.1);
    color: #ff6b7a;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    color: var(--text-secondary);
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    outline: none;
}

.auth-btn.primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 174, 239, 0.3);
}

.auth-btn.primary:active {
    transform: translateY(0);
}

.auth-btn.secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 2px solid var(--border);
}

.auth-btn.secondary:hover {
    background: var(--surface-lighter);
    border-color: var(--accent);
    color: var(--accent);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Divider */
.auth-divider {
    margin: 25px 0;
    text-align: center;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    background: var(--surface);
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Demo Accounts */
.demo-accounts {
    background: var(--surface-light);
    padding: 20px;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.demo-accounts h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text);
    text-align: center;
}

.demo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-item {
    background: var(--surface);
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 1px solid var(--border);
}

.demo-item:hover {
    background: var(--surface-lighter);
    border-color: var(--accent);
    transform: translateX(5px);
}

.demo-item strong {
    color: var(--accent);
}

/* Footer */
.auth-footer {
    padding: 25px 30px;
    background: var(--surface-light);
    border-top: 1px solid var(--border);
    text-align: center;
}

.auth-footer p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .auth-container {
        max-width: 100%;
        border-radius: 16px;
    }
    
    .auth-header {
        padding: 30px 20px 25px;
    }
    
    .auth-logo {
        height: 50px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-form-container {
        padding: 25px 20px;
    }
    
    .form-input {
        padding: 12px 12px 12px 40px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .auth-btn {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .footer-links {
        gap: 15px;
    }
}

@media (max-width: 360px) {
    .auth-header {
        padding: 25px 15px 20px;
    }
    
    .auth-form-container {
        padding: 20px 15px;
    }
    
    .checkbox-container {
        font-size: 13px;
    }
    
    .demo-accounts {
        padding: 15px;
    }
}

/* Animation for form submission */
@keyframes submitLoading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: submitLoading 1s linear infinite;
}

/* Focus styles for accessibility */
.form-input:focus,
.auth-btn:focus,
.checkbox-container:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #555555;
        --text-secondary: #DDDDDD;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
