/**
 * Login/Register Page Styles
 */

/* Allow scrolling */
html, body {
    overflow: auto !important;
    height: auto !important;
}

/* Auth Page Container */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-primary);
    position: relative;
}

/* Top Controls Container */
.controls-top-right {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    z-index: 100;
}

/* Language Select */
.language-select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-select:hover {
    border-color: var(--primary);
}

.language-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Back Link */
.back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}
.auth-container {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .auth-container {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.auth-logo .logo-icon {
    font-size: 2.5rem;
}

.auth-logo .logo-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.auth-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Age Options */
.age-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.age-option {
    cursor: pointer;
    min-width: 0;
}

.age-option input {
    display: none;
}

.age-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.75rem 0.25rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    text-align: center;
    min-width: 0;
}

.age-card:hover {
    border-color: var(--primary);
}

.age-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.age-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.2;
    word-break: keep-all;
    white-space: nowrap;
}

.age-range {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.age-option input:checked + .age-card {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(168, 85, 247, 0.1));
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.age-option input:checked + .age-card .age-label {
    color: var(--primary);
}

.age-option input:checked + .age-card .age-icon {
    transform: scale(1.1);
}

/* Light mode age cards */
[data-theme="light"] .age-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .age-option input:checked + .age-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.05));
}

/* Form Options Row */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.remember-me,
.terms-agree {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-me input,
.terms-agree input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.forgot-password-row {
    text-align: center;
    margin-top: 1rem;
}

.terms-agree a {
    color: var(--primary);
    text-decoration: none;
}

.terms-agree a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.btn-full {
    width: 100%;
}

/* Auth Message */
.auth-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1rem;
}

.auth-message:empty {
    display: none;
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

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

/* Guest Option */
.guest-option {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.guest-option span {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Theme Toggle Fixed */
.theme-toggle-fixed {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-fixed:hover {
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 1.5rem;
    }
    
    .age-options {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
