/* Kidlio Auth Page Styles */
/* Diğer sayfalarla tutarlı tasarım */

/* ==========================================
   AUTH CARD
   ========================================== */

.auth-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.48) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 0;
    box-shadow:
        0 8px 32px rgba(107, 120, 240, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 460px;
    margin: 30px auto;
    overflow: hidden;
}

/* ==========================================
   AUTH TABS
   ========================================== */

.auth-tabs {
    display: flex;
    background: rgba(107, 120, 240, 0.1);
    border-bottom: 1px solid rgba(107, 120, 240, 0.15);
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(36, 55, 105, 0.6);
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.auth-tab:hover {
    color: rgba(36, 55, 105, 0.8);
    background: rgba(107, 120, 240, 0.05);
}

.auth-tab.active {
    color: #5B6AE8;
    background: rgba(255, 255, 255, 0.5);
}

.auth-tab.active::after {
    background: linear-gradient(90deg, #6B78F0, #9470F5);
}

.tab-icon {
    font-size: 1.1rem;
}

/* ==========================================
   AUTH FORM CONTAINER
   ========================================== */

.auth-form-container {
    display: none;
    padding: 24px 32px 28px;
    animation: fadeIn 0.3s ease;
}

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

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

/* ==========================================
   AUTH HEADER
   ========================================== */

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: block;
}

.auth-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #243769;
    margin: 0 0 6px 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.auth-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    color: rgba(36, 55, 105, 0.7);
    margin: 0;
}

/* ==========================================
   AUTH FORM
   ========================================== */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-form label {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #243769;
}

.required {
    color: #EF4444;
    font-weight: 700;
    margin-left: 2px;
}

.required-note {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.78rem;
    color: rgba(36, 55, 105, 0.6);
    margin: 3px 0 0 0;
    text-align: right;
}

.input-hint {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.75rem;
    color: rgba(36, 55, 105, 0.55);
    margin: 4px 0 0 0;
    padding-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 0.95rem;
    z-index: 1;
}

.auth-form input:not(.otp-input) {
    width: 100%;
    padding: 11px 14px 11px 42px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.92rem;
    color: #243769;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(107, 120, 240, 0.25);
    border-radius: 11px;
    outline: none;
    transition: all 0.3s ease;
}

.auth-form input:not(.otp-input)::placeholder {
    color: rgba(36, 55, 105, 0.4);
}

.auth-form input:not(.otp-input):focus {
    border-color: rgba(107, 120, 240, 0.5);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(107, 120, 240, 0.1);
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

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

/* ==========================================
   AUTH ERROR
   ========================================== */

.auth-error {
    display: none;
    padding: 11px 15px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 9px;
    color: #DC2626;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    text-align: center;
}

/* ==========================================
   AUTH BUTTON
   ========================================== */

.btn-auth {
    position: relative;
    width: 100%;
    padding: 12px 22px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #6B78F0 0%, #9470F5 100%);
    border: none;
    border-radius: 11px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 120, 240, 0.35);
    margin-top: 6px;
}

.btn-auth:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 120, 240, 0.45);
}

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

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-auth.loading .btn-text {
    opacity: 0;
}

.btn-auth.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.btn-signup {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-signup:hover:not(:disabled) {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

/* ==========================================
   AUTH SWITCH
   ========================================== */

.auth-switch {
    margin-top: 16px;
    text-align: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    color: rgba(36, 55, 105, 0.7);
}

.switch-link {
    background: none;
    border: none;
    color: #6B78F0;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    transition: color 0.2s;
}

.switch-link:hover {
    color: #5B6AE8;
    text-decoration: underline;
}

/* ==========================================
   DARK MODE
   ========================================== */

body.dark .auth-card {
    background: linear-gradient(145deg, rgba(129, 140, 248, 0.15) 0%, rgba(148, 112, 245, 0.1) 100%);
    border-color: rgba(129, 140, 248, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark .auth-tabs {
    background: rgba(25, 18, 60, 0.3);
    border-color: rgba(129, 140, 248, 0.2);
}

body.dark .auth-tab {
    color: rgba(255, 255, 255, 0.5);
}

body.dark .auth-tab:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(129, 140, 248, 0.1);
}

body.dark .auth-tab.active {
    color: #A5B4FC;
    background: rgba(129, 140, 248, 0.15);
}

body.dark .auth-tab.active::after {
    background: linear-gradient(90deg, #818CF8, #A78BFA);
}

body.dark .auth-title {
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.dark .auth-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

body.dark .auth-form label {
    color: rgba(255, 255, 255, 0.9);
}

body.dark .required {
    color: #F87171;
}

body.dark .required-note {
    color: rgba(255, 255, 255, 0.5);
}

body.dark .input-hint {
    color: rgba(255, 255, 255, 0.45);
}

body.dark .auth-form input:not(.otp-input) {
    background: rgba(25, 18, 60, 0.4);
    border-color: rgba(129, 140, 248, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

body.dark .auth-form input:not(.otp-input)::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

body.dark .auth-form input:not(.otp-input):focus {
    border-color: rgba(129, 140, 248, 0.6);
    background: rgba(25, 18, 60, 0.5);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

body.dark .auth-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.35);
    color: #FCA5A5;
}

body.dark .auth-switch {
    color: rgba(255, 255, 255, 0.6);
}

body.dark .switch-link {
    color: #A5B4FC;
}

body.dark .switch-link:hover {
    color: #C4B5FD;
}

/* ==========================================
   FORGOT PASSWORD LINK
   ========================================== */

.forgot-password-link {
    text-align: right;
    margin-top: -8px;
}

.forgot-link {
    background: none;
    border: none;
    color: #6B78F0;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #5B6AE8;
    text-decoration: underline;
}

body.dark .forgot-link {
    color: #A5B4FC;
}

body.dark .forgot-link:hover {
    color: #C4B5FD;
}

/* ==========================================
   MODAL OVERLAY
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 32px;
    box-shadow:
        0 8px 32px rgba(107, 120, 240, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(107, 120, 240, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: #6B78F0;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(107, 120, 240, 0.2);
    transform: scale(1.1);
}

body.dark .modal-content {
    background: linear-gradient(145deg, rgba(25, 18, 60, 0.95) 0%, rgba(15, 10, 45, 0.95) 100%);
    border-color: rgba(129, 140, 248, 0.25);
}

body.dark .modal-close {
    background: rgba(129, 140, 248, 0.15);
    color: #A5B4FC;
}

body.dark .modal-close:hover {
    background: rgba(129, 140, 248, 0.25);
}

/* ==========================================
   FORGOT STEPS
   ========================================== */

.forgot-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.forgot-step.active {
    display: block;
}

.forgot-step .auth-header {
    margin-bottom: 20px;
}

.forgot-step .auth-title {
    font-size: 1.35rem;
}

.resend-link {
    display: block;
    width: 100%;
    margin-top: 16px;
    background: none;
    border: none;
    color: #6B78F0;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s;
}

.resend-link:hover {
    color: #5B6AE8;
    text-decoration: underline;
}

body.dark .resend-link {
    color: #A5B4FC;
}

body.dark .resend-link:hover {
    color: #C4B5FD;
}

/* ==========================================
   SIGNUP STEPS
   ========================================== */

.signup-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.signup-step.active {
    display: block;
}

/* Form Row - Two columns for name fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row .form-group {
    margin-bottom: 0;
}


/* ==========================================
   OTP INPUT STYLES
   ========================================== */

.otp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    border: 2px solid #E0E7FF;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff 0%, #F8F9FF 100%);
    color: #243769 !important;
    -webkit-text-fill-color: #243769 !important;
    transition: all 0.2s ease;
    outline: none;
    caret-color: #6B78F0;
}

.otp-input:focus {
    border-color: #6B78F0;
    box-shadow: 0 0 0 3px rgba(107, 120, 240, 0.15),
                0 4px 12px rgba(107, 120, 240, 0.12);
    transform: translateY(-2px);
}

.otp-input:hover:not(:focus) {
    border-color: #A5B4FC;
}

/* Filled state */
.otp-input:not(:placeholder-shown) {
    background: linear-gradient(145deg, #EEF2FF 0%, #E0E7FF 100%);
    border-color: #818CF8;
}

/* Error state */
.otp-container.error .otp-input {
    border-color: #EF4444;
    background: linear-gradient(145deg, #FEF2F2 0%, #FEE2E2 100%);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* Dark mode OTP */
body.dark .otp-input,
.dark .otp-input,
html.dark-loading .otp-input {
    background: #120e38 !important;
    border-color: #6B78F0 !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

body.dark .otp-input:focus,
.dark .otp-input:focus {
    border-color: #818CF8 !important;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.3),
                0 4px 12px rgba(107, 120, 240, 0.3);
}

body.dark .otp-input:hover:not(:focus),
.dark .otp-input:hover:not(:focus) {
    border-color: #818CF8 !important;
}

body.dark .otp-container.error .otp-input,
.dark .otp-container.error .otp-input {
    border-color: #F87171 !important;
    background: rgba(127, 29, 29, 0.5) !important;
}


/* Spam Notice */
.spam-notice {
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 10px;
    font-size: 0.8rem;
    color: #92400E;
    text-align: center;
    line-height: 1.4;
}

body.dark .spam-notice {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: #FCD34D;
}

