/* ============================================
   AUTH.CSS v2.0 - Tamamen düzeltildi
   ============================================ */

/* ===== AUTH MODAL (popup) ===== */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-modal[style*="flex"] {
    display: flex !important;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    z-index: 1;
    background: #141824;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-modal-content.show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #8892a4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
    line-height: 1;
}

.auth-modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Modal Header */
.auth-modal-header {
    margin-bottom: 1.8rem;
    text-align: center;
}

.auth-modal-logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.6rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ff3366, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: block;
}

.auth-modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
}

.auth-modal-header p {
    color: #8892a4;
    font-size: 0.9rem;
}

/* Form Fields */
.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #a0a8b9;
    margin-bottom: 0.45rem;
    letter-spacing: 0.3px;
}

.auth-field input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.25s ease;
    outline: none;
    box-sizing: border-box;
}

.auth-field input:focus {
    border-color: #ff3366;
    background: rgba(255, 51, 102, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.12);
}

.auth-field input::placeholder {
    color: #4b5563;
}

.auth-field input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Password wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 3rem;
}

.toggle-pw {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    line-height: 1;
    padding: 0.3rem;
    color: #fff;
}

.toggle-pw:hover {
    opacity: 1;
}

/* Options row */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.83rem;
    color: #8892a4;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    accent-color: #ff3366;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.forgot-pw {
    font-size: 0.83rem;
    color: #ff3366;
    cursor: pointer;
    transition: opacity 0.2s;
    background: none;
    border: none;
    padding: 0;
    font-family: 'DM Sans', sans-serif;
}

.forgot-pw:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    box-sizing: border-box;
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #ff3366, #ff5580);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 51, 102, 0.35);
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 51, 102, 0.5);
}

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

.btn-arrow {
    transition: transform 0.2s ease;
    font-size: 1rem;
}

.auth-btn-primary:hover:not(:disabled) .btn-arrow {
    transform: translateX(4px);
}

/* Divider */
.auth-divider {
    text-align: center;
    position: relative;
    margin: 0.8rem 0;
    color: #4b5563;
    font-size: 0.82rem;
}

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

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-divider span {
    position: relative;
    z-index: 1;
    background: #141824;
    padding: 0 0.5rem;
}

/* Switch */
.auth-switch {
    text-align: center;
    font-size: 0.88rem;
    color: #6b7280;
    margin-top: 1rem;
}

.auth-switch span {
    color: #ff3366;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-switch span:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Password Strength */
.password-strength {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.strength-text {
    font-size: 0.73rem;
    margin-top: 0.3rem;
    font-weight: 600;
    min-height: 1rem;
}

/* Error / Success */
.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 3px solid #ef4444;
    color: #ef4444;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
    line-height: 1.4;
}

.auth-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-left: 3px solid #10b981;
    color: #10b981;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
    line-height: 1.4;
}

/* Loading spinner */
.btn-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    flex-shrink: 0;
}

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

/* ===== FULL PAGE AUTH (yedek - modal yoksa) ===== */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #080b14;
    position: relative;
    overflow: hidden;
}

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

.auth-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #ff3366 0%, transparent 70%);
    top: -200px; left: -200px;
}
.orb2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    bottom: -150px; right: -150px;
    animation-delay: -3s;
}
.orb3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #00d4ff 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -6s;
}

@keyframes orbFloat {
    0%, 100% { transform: scale(1) translate(0, 0); }
    33% { transform: scale(1.1) translate(20px, -20px); }
    66% { transform: scale(0.95) translate(-10px, 15px); }
}

/* ===== GUEST BANNER ===== */
.guest-app-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.1));
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.7rem 1.5rem;
    text-align: center;
    font-size: 0.88rem;
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.guest-app-banner button {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: 'DM Sans', sans-serif;
    transition: opacity 0.2s;
}

.guest-app-banner button:hover { opacity: 0.85; }

/* Guest CTA Card */
.guest-cta-card {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.08), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(255, 51, 102, 0.2);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.guest-cta-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.guest-cta-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.7rem; color: #fff; }
.guest-cta-card p { color: #8892a4; margin-bottom: 1.5rem; line-height: 1.6; }

.guest-cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: 1.8rem 1.4rem;
        border-radius: 16px;
        max-height: 95vh;
    }

    .auth-modal-header h3 { font-size: 1.3rem; }
    .auth-btn { padding: 0.8rem; }
    .guest-app-banner { font-size: 0.8rem; padding: 0.6rem 1rem; }
}

/* In-library button state */
.add-to-list-btn.in-library {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.add-to-list-btn.in-library:hover {
    background: rgba(16, 185, 129, 0.15);
}