/* #region 1: ÜST MENÜ BAR (TOP NAV) */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 clamp(16px, 3vw, 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: var(--z-nav);
    pointer-events: none;
}

.top-nav-brand {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.top-nav-brand:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.nav-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-brand-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.top-nav-actions {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-nav-btn {
    height: 38px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-pill);
    background: rgba(21, 24, 36, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
}

.top-nav-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-highlight);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.user-dropdown-wrapper {
    position: relative;
    pointer-events: auto;
}

.user-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    width: max-content;
    max-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-input);
    box-shadow: var(--shadow-card);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: var(--z-nav);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.user-dropdown-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown-item {
    width: 100%;
    padding: 9px 14px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.user-dropdown-item:hover {
    background: var(--bg-pill-hover);
    color: var(--text-primary);
}

.user-dropdown-item.text-danger {
    color: #ff6b6b;
}

.user-dropdown-item.text-danger:hover {
    background: rgba(229, 9, 20, 0.15);
    color: #ff8787;
}
/* #endregion */


/* #region 3: AUTH MODAL KUTUSU (BOX) */
.auth-modal-box {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.auth-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-pill);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.auth-modal-close:hover {
    background: var(--bg-pill-hover);
    color: var(--text-primary);
}
/* #endregion */

/* #region 4: FORM VE INPUT ALANLARI */
.auth-form,
.auth-form-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: var(--text-tertiary);
}

.auth-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-error-box {
    padding: 10px 14px;
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: var(--radius-input);
    color: #ff6b6b;
    font-size: 13px;
    line-height: 1.4;
    box-sizing: border-box;
}

.auth-success-box {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #4ade80;
}

.auth-submit-btn {
    width: 100%;
    height: 46px;
    min-height: 46px;
    padding: 0 20px;
    margin-top: 6px;
    background: var(--accent-color);
    border: none;
    border-radius: var(--radius-input);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit-btn:hover {
    background: #4c6ef5;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

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

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    box-sizing: border-box;
}

.auth-switch-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.auth-switch-btn:hover {
    color: var(--accent-color);
}

.auth-aux-links,
.landing-aux-links {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
    margin-bottom: 2px;
    width: 100%;
}

.auth-link-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s ease;
}

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

.auth-info-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: center;
    margin: 0 0 10px 0;
}
/* #endregion */

/* #region 5: GİRİŞ YAPILMIŞ GÖRÜNÜM VE ANİMASYONLAR */
.auth-logged-in-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 6px 0;
}

.account-card-header {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-input);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.account-user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.account-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.account-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.account-username {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-email {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-profile-link {
    font-size: 12px;
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(129, 140, 248, 0.1);
    transition: all 0.2s ease;
}

.account-profile-link:hover {
    background: rgba(129, 140, 248, 0.2);
    text-decoration: none;
    transform: translateY(-1px);
}

.account-actions-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}

.account-toggle-label {
    display: flex;
    align-items: center;
    gap: 9px;
}



.account-toggle-chevron {
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.account-toggle-btn.is-active .account-toggle-chevron {
    transform: rotate(180deg);
}

.account-password-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-input);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeInSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.secondary-submit {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    box-shadow: none;
    font-size: 13px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.secondary-submit:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.account-footer-danger {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
    width: 100%;
}

.account-delete-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.38);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.account-delete-link:hover {
    color: #ff6b6b;
}

.account-delete-confirm-box {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    background: rgba(229, 9, 20, 0.08);
    border: 1px solid rgba(229, 9, 20, 0.25);
    border-radius: var(--radius-input);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
    animation: fadeInSlide 0.2s ease;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-delete-warning-text {
    font-size: 12px;
    color: #ff8787;
    line-height: 1.45;
    margin: 0;
}

.account-delete-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.account-delete-cancel-btn {
    flex: 1;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-input);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.account-delete-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

.account-delete-confirm-btn {
    flex: 1.3;
    height: 38px;
    background: #e50914;
    border: none;
    border-radius: var(--radius-input);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.35);
}

.account-delete-confirm-btn:hover {
    background: #f40612;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.5);
}

.account-delete-confirm-btn:disabled,
.account-delete-cancel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Toast Bildirimi Varyasyonları (base.css içindeki merkezi tokenlardan beslenir) */

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: none;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.danger-action {
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.4);
    color: #ff6b6b;
    box-shadow: none;
}

.danger-action:hover {
    background: rgba(229, 9, 20, 0.25);
    color: #ff8787;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.2);
}

.shake-box-animation {
    animation: shake 0.4s ease;
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-3px); }
    40%, 60% { transform: translateX(3px); }
}

.success-box-animation {
    animation: successPop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes successPop {
    0% { transform: scale(0.96); opacity: 0.8; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

.cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
}

.cf-turnstile.is-active {
    max-height: 100px;
    opacity: 1;
    margin: 8px 0;
    pointer-events: auto;
}
/* #endregion */

/* #region 14: MOBİLDE SABİT ÜST MENÜ BAR */
@media (max-width: 899px) {
    .top-nav {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        height: 54px !important;
        padding: 0 clamp(12px, 4vw, 24px);
        z-index: var(--z-nav);
        pointer-events: none;
    }

    .top-nav-brand,
    .top-nav-actions {
        pointer-events: auto;
    }

    .top-nav-btn {
        height: 36px;
        padding: 0 14px;
        font-size: 12px;
    }

    .nav-logo {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .nav-brand-text {
        font-size: 15px;
    }

    .user-dropdown-panel {
        top: calc(100% + 4px);
        right: 0;
    }
}
/* #endregion */

