﻿/* ===== QUANTUM AUTH STYLES ===== */
.quantum-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

/* ===== AUTH CARD ===== */
.auth-card {
    position: relative;
    background: rgba(9, 12, 20, 0.96); /* solid dark panel */
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(2,6,23,0.6), var(--shadow-quantum);
    overflow: hidden;
    width: 100%;
}

.auth-card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    padding: 0;
}

.auth-tabs {
    display: flex;
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: none;
    border: none;
    color: var(--quantum-text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    color: var(--quantum-text);
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab.active {
    color: var(--quantum-text);
}

.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.auth-tab.active .tab-indicator {
    transform: scaleX(1);
}

/* 🎯 DODANE: WIDŻET STANU REJESTRACJI */
.registration-status-widget {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    cursor: help;
    transition: all 0.3s ease;
}

.status-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-indicator:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.status-open {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-verify {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-closed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-maintenance {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-free {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.status-icon {
    font-size: 1rem;
}

.status-text {
    flex: 1;
}

.tooltip-icon {
    opacity: 0.7;
    font-size: 0.8rem;
}

/* 🎯 DODANE: INFORMACJA O TRYBIE REJESTRACJI */
.registration-mode-info {
    margin: 15px 0;
    text-align: center;
}

.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.mode-icon {
    font-size: 0.9rem;
}

.mode-text {
    font-weight: 500;
}

/* 🎯 DODANE: INFO O UNIFIED SYSTEM */
.system-info {
    margin-top: 8px;
}

.system-info small {
    color: var(--quantum-text-muted);
    font-size: 0.75rem;
    opacity: 0.7;
}

.auth-card-content {
    padding: 40px;
}

/* ===== PANELS ===== */
.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
    animation: quantumFadeIn 0.4s ease-out;
}

@keyframes quantumFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    text-align: center;
    margin-bottom: 32px;
}

.panel-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--quantum-text);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.panel-subtitle {
    font-size: 1rem;
    color: var(--quantum-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ===== MESSAGES ===== */
.auth-message {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.auth-message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.message-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ===== FORMS ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--quantum-text);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 16px 48px 16px 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    color: var(--quantum-text);
    font-size: 1rem;
    transition: all 0.3s ease;
    text-shadow: 0 1px 0 rgba(0,0,0,0.18);
}

.form-input::placeholder {
    color: var(--quantum-text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--quantum-primary);
    box-shadow: 0 6px 24px rgba(16,24,40,0.45), 0 0 0 4px rgba(255, 107, 107, 0.06);
    background: rgba(255, 255, 255, 0.1);
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--quantum-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--quantum-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--quantum-text);
    background: rgba(255, 255, 255, 0.1);
}

.toggle-icon {
    width: 20px;
    height: 20px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--quantum-text-muted);
    margin-top: 6px;
}

/* 🎯 DODANE: PANEL WYMAGAŃ HASŁA */
.password-requirements-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.requirements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.requirements-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--quantum-text);
    font-weight: 600;
}

.toggle-requirements {
    background: none;
    border: none;
    color: var(--quantum-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.toggle-requirements:hover {
    color: var(--quantum-text);
}

.toggle-requirements.active {
    transform: rotate(180deg);
}

.requirements-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.requirements-content.expanded {
    max-height: 300px;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--quantum-text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.requirement-item:last-child {
    border-bottom: none;
}

.requirement-item.valid {
    color: #10b981;
}

.requirement-item.invalid {
    color: #ef4444;
}

.requirement-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.requirement-text {
    flex: 1;
}

.requirements-note {
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #ef4444;
}

.requirements-note p {
    margin: 0;
}

/* 🎯 DODANE: METER SIŁY HASŁA */
.password-strength-meter {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
    position: relative;
}

.strength-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #ef4444;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar.weak::before {
    width: 25%;
    background: #ef4444;
}

.strength-bar.medium::before {
    width: 50%;
    background: #f59e0b;
}

.strength-bar.strong::before {
    width: 75%;
    background: #10b981;
}

.strength-bar.very-strong::before {
    width: 100%;
    background: #059669;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--quantum-text-muted);
}

.strength-value {
    font-weight: 600;
}

.strength-value.weak {
    color: #ef4444;
}

.strength-value.medium {
    color: #f59e0b;
}

.strength-value.strong {
    color: #10b981;
}

.strength-value.very-strong {
    color: #059669;
}

/* ===== FORM OPTIONS ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.form-options.vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--quantum-text-secondary);
    line-height: 1.4;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: var(--quantum-primary);
    border-color: var(--quantum-primary);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label a {
    color: var(--quantum-primary);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: var(--quantum-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* ===== ULEPSZONE BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 160px;
    width: auto;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-full {
    width: auto;
    display: flex;
    margin: 0 auto;
}

.btn-primary {
    background: linear-gradient(180deg, #ff6b6b, #ff3b3b); /* solid-looking warm red */
    color: #ffffff;
    border: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.95rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    padding: 16px 40px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
    filter: brightness(1.03);
}

/* Przycisk rejestracji - bardziej wyraźny */
#register-panel .btn-primary {
    background: linear-gradient(180deg, #5b6bff, #3b4bff); /* solid-looking indigo */
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    padding: 16px 40px;
}

#register-panel .btn-primary:hover:not(:disabled) {
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
    filter: brightness(1.03);
}

.btn-google {
    background: white;
    color: #374151;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
}

.btn-google:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-social {
    padding: 12px 20px;
    font-size: 0.9rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading .btn-loader {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== FORM ACTIONS ===== */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

/* ===== SOCIAL AUTH ===== */
.social-auth-section {
    margin-top: 32px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--quantum-text-muted);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider-text {
    padding: 0 16px;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

/* ===== DODATKOWE STYLE DLA SYSTEMU AUTH ===== */

/* Status input */
.input-status {
    position: absolute;
    right: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.input-status.valid {
    color: #10b981;
}

.input-status.invalid {
    color: #ef4444;
}

/* Verification notice */
.verification-notice {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: #3b82f6;
}

.notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notice-content strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.notice-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Maintenance mode */
.maintenance-mode {
    text-align: center;
    padding: 40px 20px;
}

.maintenance-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.maintenance-mode h3 {
    color: var(--quantum-text);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.maintenance-mode p {
    color: var(--quantum-text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.maintenance-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.maintenance-info p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.maintenance-info strong {
    color: var(--quantum-text);
}

/* Loading states */
.form-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-pulse {
    animation: successPulse 0.6s ease-in-out;
}

/* ===== FORM VALIDATION ===== */
.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-error::before {
    content: '⚠';
    font-size: 0.9rem;
}

/* ===== STYLE DLA TEKSTOWEJ CAPTCHA ===== */
.text-captcha-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
}

.captcha-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--quantum-text);
    font-size: 0.9rem;
}

.captcha-display {
    text-align: center;
    margin-bottom: 15px;
}

.captcha-code {
    display: inline-block;
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    border: 2px solid var(--quantum-primary);
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #333;
    background: #f8f9fa;
    user-select: none;
}

.captcha-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.captcha-input {
    flex: 1;
    text-align: center;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.btn-refresh-captcha {
    background: var(--quantum-primary);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-refresh-captcha:hover {
    background: var(--quantum-primary-dark);
    transform: translateY(-1px);
}

.captcha-hint {
    margin-top: 8px;
}

.captcha-hint small {
    color: var(--quantum-text-muted);
    font-size: 0.8rem;
}

/* CAPTCHA disabled notice */
.captcha-disabled-notice {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    color: #f59e0b;
}

.captcha-disabled-notice p {
    margin: 0;
    font-size: 0.9rem;
}

/* Ukryte pola honeypot */
.honeypot-fields {
    display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .quantum-auth-wrapper {
        padding: 16px;
        align-items: flex-start;
    }
    
    .auth-container {
        max-width: 100%;
    }
    
    .auth-card-content {
        padding: 24px;
    }
    
    .auth-tab {
        padding: 16px 12px;
        font-size: 0.9rem;
    }
    
    .panel-title {
        font-size: 1.5rem;
    }
    
    .registration-status-widget {
        padding: 12px 16px;
    }
    
    .status-indicator {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .captcha-code {
        font-size: 20px;
        padding: 12px 20px;
    }
    
    .captcha-input-group {
        flex-direction: column;
    }
    
    .btn-refresh-captcha {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-card-content {
        padding: 20px;
    }
    
    .panel-title {
        font-size: 1.25rem;
    }
    
    .auth-tab {
        flex-direction: column;
        gap: 4px;
    }
    
    .captcha-code {
        font-size: 18px;
        padding: 10px 15px;
    }
}

    /* Ukryj niepotrzebne elementy na stronie auth */
    .anime-auth-page .site-header,
    .anime-auth-page .site-footer,
    .anime-auth-page .breadcrumbs,
    .anime-auth-page .admin-bar {
        display: none !important;
    }
    
    .anime-auth-page {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .auth-page-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

/* ── Verify Mode Notice (registration form) ── */
.verify-mode-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border: 1.5px solid #8b5cf6;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
    color: #4c1d95;
}
.verify-mode-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.verify-mode-notice strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #3b0764;
}
.verify-mode-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #5b21b6;
}
