/**
 * Kullanıcı sayfası (/user/:id) ve yorum yazar linki
 */

/* Profil sayfası açıkken body gradient kaldır – navbar solunda renk uyumsuzluğu önlenir */
body:has(#user-profile-page:not(.u-hidden)) {
    background: var(--bg-100) !important;
}

.user-profile-page {
    display: none;
    min-height: 60vh;
    padding: 24px 20px 48px;
    background: var(--bg-100);
}
/* Profil sayfası görünürken geri oku navbar altında kalsın (fixed navbar 60px) */
.user-profile-page:not(.u-hidden) {
    display: block;
    padding-top: 84px; /* 60px navbar + 24px nefes alanı */
}
@media (max-width: 900px) {
    .user-profile-page:not(.u-hidden) {
        padding-top: 80px; /* 56px mobil navbar + 24px nefes alanı */
    }
}
.user-profile-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.user-profile-inner .back-to-home {
    margin-bottom: 24px;
}
.favorites-page-inner > .back-to-home {
    margin-bottom: 24px;
    width: fit-content;
    align-self: flex-start;
}
.user-profile-content {
    margin-bottom: 32px;
}
.user-profile-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}
.user-profile-avatar-wrap {
    flex-shrink: 0;
}
.user-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-200);
}
.user-profile-info-wrap {
    flex: 1;
    min-width: 0;
}
.user-profile-name {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-100);
    letter-spacing: -0.02em;
}
.user-profile-email {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--text-300);
}
.user-profile-bio-container {
    margin-top: 12px;
}
.user-profile-bio-view-mode {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.user-profile-bio-display {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-200);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 600px;
}
.user-profile-bio-empty {
    font-size: 14px;
    color: var(--text-300);
    font-style: italic;
}
.user-profile-bio-edit-btn {
    padding: 6px 14px;
    background: transparent;
    color: var(--text-200);
    border: 1px solid var(--border-200);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    align-self: flex-start;
}
.user-profile-bio-edit-btn:hover {
    background: var(--bg-200);
    border-color: var(--border-300);
    color: var(--text-100);
}
.user-profile-bio-edit-mode {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.user-profile-bio-cancel {
    padding: 6px 14px;
    background: transparent;
    color: var(--text-200);
    border: 1px solid var(--border-200);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.user-profile-bio-cancel:hover {
    background: var(--bg-200);
    border-color: var(--border-300);
    color: var(--text-100);
}
.user-profile-bio-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
}
.user-profile-bio-input {
    width: 100%;
    min-height: 80px;
    max-height: 120px;
    padding: 10px 12px;
    background: var(--bg-200);
    border: 1px solid var(--border-200);
    border-radius: 8px;
    color: var(--text-100);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
    overflow-y: auto;
}
.user-profile-bio-input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.user-profile-bio-char-count {
    font-size: 12px;
    color: var(--text-300);
    text-align: right;
    margin-top: -4px;
    padding-right: 4px;
}
.user-profile-bio-char-count.warning {
    color: #f59e0b;
}
.user-profile-bio-char-count.error {
    color: #ef4444;
    font-weight: 600;
}
.user-profile-bio-error-msg {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: none;
}
.user-profile-bio-error-msg.show {
    display: block;
}
.user-profile-bio-input:focus {
    border-color: var(--accent, #3b82f6);
    background: var(--bg-300);
}
.user-profile-bio-input::placeholder {
    color: var(--text-300);
}
.user-profile-bio-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.user-profile-bio-save {
    padding: 6px 16px;
    background: var(--accent, #3b82f6);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}
.user-profile-bio-save:hover {
    background: var(--accent-hover, #2563eb);
}
.user-profile-bio-save:active {
    opacity: 0.8;
}
.user-profile-bio-save.saved {
    background: #10b981;
}
.user-profile-bio-save.saved:hover {
    background: #059669;
}
/* Light mode için bio stilleri */
body:not(.dark) .user-profile-bio-input {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.1);
    color: #111827;
}
body:not(.dark) .user-profile-bio-input:focus {
    background: #ffffff;
    border-color: var(--accent, #3b82f6);
}
body:not(.dark) .user-profile-bio-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}
body:not(.dark) .user-profile-bio-display {
    color: #374151;
}
body:not(.dark) .user-profile-bio-empty {
    color: rgba(0, 0, 0, 0.5);
}
body:not(.dark) .user-profile-bio-edit-btn,
body:not(.dark) .user-profile-bio-cancel {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #374151;
}
body:not(.dark) .user-profile-bio-edit-btn:hover,
body:not(.dark) .user-profile-bio-cancel:hover {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.15);
    color: #111827;
}
body:not(.dark) .user-profile-bio-input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
body:not(.dark) .user-profile-bio-char-count.warning {
    color: #d97706;
}
body:not(.dark) .user-profile-bio-char-count.error {
    color: #dc2626;
}
body:not(.dark) .user-profile-bio-error-msg {
    color: #dc2626;
}
/* Responsive - mobil için bio */
@media (max-width: 600px) {
    .user-profile-header {
        gap: 16px;
    }
    .user-profile-avatar {
        width: 64px;
        height: 64px;
    }
    .user-profile-name {
        font-size: 20px;
    }
    .user-profile-bio-wrap,
    .user-profile-bio-display {
        max-width: 100%;
    }
    .user-profile-bio-input {
        min-height: 60px;
        font-size: 13px;
    }
}
.user-profile-loading,
.user-profile-error,
.user-profile-empty,
.user-profile-private {
    color: var(--text-300);
    margin: 0 0 16px;
    font-size: 15px;
}
.user-profile-error {
    color: var(--error, #c53030);
}
.user-profile-favorites-wrap {
    margin-top: 8px;
}
.user-profile-favorites-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-100);
}
.user-profile-favorites {
    display: grid;
    grid-template-columns: repeat(auto-fill, 180px);
    gap: 8px;
    justify-content: start;
    justify-items: start;
}
/* Masaüstünde her zaman en fazla 6 kart yatayda (ilk açılışta da aynı kalsın) */
@media (min-width: 1160px) {
    .user-profile-favorites {
        grid-template-columns: repeat(6, 180px) !important;
    }
}
@media (max-width: 1159px) and (min-width: 1000px) {
    .user-profile-favorites {
        grid-template-columns: repeat(5, 180px) !important;
    }
}
.user-profile-favorites .movie-card {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    cursor: pointer;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #111 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    position: relative !important;
    align-items: stretch !important;
}

@media (hover: hover) {
    .user-profile-favorites .movie-card:hover {
        transform: translateY(-4px) scale(1.02) translateZ(0) !important;
        box-shadow: 0 12px 32px rgba(0,0,0,0.4) !important;
        border-color: rgba(var(--brand-rgb),0.4) !important;
        z-index: 10 !important;
    }
}
/* Poster stilleri - standart card.css ile uyumlu */
.user-profile-favorites .movie-poster {
    position: relative !important;
    aspect-ratio: 2 / 3 !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
    min-height: 0 !important;
}

.user-profile-favorites .movie-poster img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    min-height: 0 !important;
}

.user-profile-favorites .movie-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 110px !important;
    padding: 12px !important;
    background: transparent !important;
}

.user-profile-favorites .movie-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.user-profile-favorites .movie-title {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    max-height: 2.4em !important;
    flex: 1 !important;
}

.user-profile-favorites .movie-badge {
    flex-shrink: 0 !important;
    background: rgba(var(--brand-rgb), 0.2) !important;
    color: var(--brand) !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: 1px solid rgba(var(--brand-rgb), 0.3) !important;
    height: fit-content !important;
}

.user-profile-favorites .movie-meta {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    flex-wrap: wrap !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: auto !important;
    text-decoration: none !important;
    border-bottom: none !important;
    text-underline-offset: 0 !important;
}

.user-profile-favorites .movie-rating {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    position: static !important;
    text-decoration: none !important;
    border-bottom: none !important;
    text-underline-offset: 0 !important;
}

.user-profile-favorites .movie-rating::before {
    content: '⭐' !important;
    font-size: 12px !important;
    display: inline-block !important;
}

.user-profile-favorites .movie-year-bottom {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    position: static !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Responsive - mobil ve tablet için kart boyutları */
@media (max-width: 999px) {
    .user-profile-favorites {
        grid-template-columns: repeat(auto-fill, 140px) !important;
        gap: 8px !important;
    }
    
    .user-profile-favorites .movie-card {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
    }
}

@media (max-width: 600px) {
    .user-profile-favorites {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .user-profile-favorites .movie-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}
/* Favorites sayfasında user-profile-favorites stilleri ASLA uygulanmamalı - override */
body.page-favorites .user-profile-favorites .movie-rating,
body.page-favorites .user-profile-favorites .user-profile-card .movie-rating {
    color: var(--text-200) !important;
}
body.page-favorites .user-profile-favorites .movie-meta-below,
body.page-favorites .user-profile-favorites .user-profile-card .movie-meta-below {
    position: absolute !important;
    left: 12px !important;
    bottom: 10px !important;
    right: auto !important;
    top: auto !important;
    margin: 0 !important;
}
body.page-favorites .user-profile-favorites .movie-info,
body.page-favorites .user-profile-favorites .user-profile-card .movie-info {
    padding: 12px !important;
    padding-bottom: 34px !important;
    background: transparent !important;
}
body.page-favorites .user-profile-favorites .movie-title,
body.page-favorites .user-profile-favorites .user-profile-card .movie-title {
    font-size: 14px !important;
    font-weight: 700 !important;
}
/* Favoriler sayfasında user-profile-card kullanılmıyor - artık .movie-card kullanılıyor */
body.page-favorites .user-profile-favorites .user-profile-card {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    background: #111 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
}

@media (hover: hover) {
    body.page-favorites .user-profile-favorites .user-profile-card:hover {
        transform: translateY(-4px) scale(1.02) translateZ(0) !important;
        box-shadow: 0 12px 32px rgba(0,0,0,0.4) !important;
        border-color: rgba(var(--brand-rgb),0.4) !important;
        z-index: 10 !important;
    }
}

/* Favoriler sayfasında .movie-card için override - diğer sayfalarla aynı görünüm */
body.page-favorites .movie-card,
body.page-favorites .favorites-grid .movie-card,
body.page-favorites #favorites-grid .movie-card,
body.page-favorites .favorites-page .movie-card,
body.page-favorites .favorites-content .movie-card,
body.page-favorites .favorites-page-inner .movie-card {
    background: #111 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    border-radius: 14px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

body.page-favorites .movie-card .movie-info,
body.page-favorites .favorites-grid .movie-card .movie-info,
body.page-favorites #favorites-grid .movie-card .movie-info {
    background: transparent !important;
}

@media (hover: hover) {
    body.page-favorites .movie-card:hover,
    body.page-favorites .favorites-grid .movie-card:hover,
    body.page-favorites #favorites-grid .movie-card:hover,
    body.page-favorites .favorites-page .movie-card:hover,
    body.page-favorites .favorites-content .movie-card:hover,
    body.page-favorites .favorites-page-inner .movie-card:hover {
        transform: translateY(-4px) scale(1.02) translateZ(0) !important;
        box-shadow: 0 12px 32px rgba(0,0,0,0.4) !important;
        border-color: rgba(var(--brand-rgb),0.4) !important;
        z-index: 10 !important;
    }
}

/* Yorumlarda kullanıcı adı linki */
.comment-author-link {
    color: var(--text-100);
    font-weight: 600;
    text-decoration: none;
}
.comment-author-link:hover {
    text-decoration: underline;
    color: var(--accent, #3b82f6);
}

/* Hesap: favoriler herkese açık checkbox */
.account-field--checkbox {
    margin-top: 8px;
}
.account-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-100);
}
.account-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent, #3b82f6);
}

/* Favoriler sayfası (favorites.html) – yenileme sonrası da footer altta, içerik yüksekliği sabit */
/* style.css'teki genel body ve .section stillerini override et */
body.page-favorites,
body.tab-favorites {
    background: var(--bg-100) !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 60px 0 0 0 !important;
}
/* favorites.html için */
body.page-favorites main.section,
body.page-favorites .favorites-standalone-main.section,
body.page-favorites .favorites-standalone-main {
    flex: 1 0 auto !important;
    min-height: 130vh !important; /* İçerik + boşluk yüksek; footer her zaman aşağıda - artırıldı */
    padding-top: 40px !important; /* Azaltıldı - filtreleme bölümü yukarı alındı */
    padding-bottom: 80px !important; /* Alt padding artırıldı - footer için daha fazla boşluk */
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-100) !important;
    margin-left: 0 !important;
}
body.page-favorites .favorites-standalone-main .favorites-page {
    flex: 1 1 auto !important;
    min-height: 85vh !important; /* İçerik bölümü her zaman yeterli yükseklikte - artırıldı */
    display: flex !important;
    flex-direction: column !important;
}
body.page-favorites .favorites-standalone-main .favorites-page-inner {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
body.page-favorites .favorites-standalone-main .favorites-content {
    flex: 1 1 auto !important;
    min-height: 80vh !important; /* Kart alanı + boşluk her zaman aynı görünsün - artırıldı */
}
/* index.html'deki favoriler sekmesi için (body.tab-favorites) - ÇOK GÜÇLÜ KURALLAR */
body.tab-favorites {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    height: auto !important;
}
body.tab-favorites main#catalog.section,
body.tab-favorites main.section#catalog,
body.tab-favorites #catalog.section {
    flex: 1 0 auto !important;
    min-height: 120vh !important; /* Footer'ın görünmemesi için yeterince yüksek */
    /* Anasayfa / diğer sekmelerle aynı hizaya gelsin diye yukarı boşluğu artır */
    padding-top: 84px !important;
    padding-bottom: 150px !important; /* Footer için maksimum boşluk */
    display: block !important;
    background: var(--bg-100) !important;
    position: relative !important;
    height: auto !important;
}
.favorites-standalone-main {
    padding-top: 40px; /* Azaltıldı - filtreleme bölümü yukarı alındı */
    padding-bottom: 80px; /* Alt padding artırıldı - footer için daha fazla boşluk */
}
@media (max-width: 900px) {
    .favorites-standalone-main { padding-top: 36px; } /* Mobilde de azaltıldı */
}
.favorites-page-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    padding-top: 0 !important; /* Üst padding kaldırıldı */
    box-sizing: border-box;
}
.favorites-page-title {
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-100);
}
.favorites-auth-required {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--border-200);
}
.favorites-auth-required.u-hidden { display: none !important; }
.favorites-auth-text {
    margin: 0 0 16px;
    color: var(--text-200);
    font-size: 16px;
}
.favorites-auth-required .btn { margin: 0 6px; }
body.page-favorites .favorites-standalone-main .favorites-content {
    flex: 1 1 auto !important;
    min-height: 80vh !important; /* Kart alanı + boşluk her zaman aynı görünsün - artırıldı */
    position: relative !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* Boş favoriler durumu tasarımı */
.favorites-empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    padding: 60px 20px !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    grid-column: 1/-1 !important;
    justify-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.page-favorites .favorites-empty-state,
body.page-favorites #favorites-grid .favorites-empty-state,
body.page-favorites .favorites-grid .favorites-empty-state {
    grid-column: 1/-1 !important;
    justify-self: center !important;
    align-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.favorites-empty-icon {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.05) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 8px !important;
    transition: transform 0.3s ease, background 0.3s ease !important;
}

.favorites-empty-icon i {
    font-size: 36px !important;
    color: rgba(255,255,255,0.3) !important;
}

.favorites-empty-state h3 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--text-100) !important;
    margin: 0 !important;
}

.favorites-empty-state p {
    font-size: 14px !important;
    color: var(--text-300) !important;
    margin: 0 !important;
    max-width: 400px !important;
    line-height: 1.5 !important;
}
.favorites-loading {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 40px !important;
    color: var(--text-300) !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.page-favorites .favorites-loading,
body.page-favorites #favorites-loading {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: absolute !important;
    top: 50% !important;
}

body.page-favorites .favorites-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    position: relative !important;
}

.favorites-loading p {
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
    display: block !important;
}

.favorites-loading .loading-spinner {
    margin: 0 auto !important;
    display: block !important;
    width: 40px !important;
    height: 40px !important;
}

.favorites-loading.u-hidden { display: none !important; }
.favorites-filters-wrap.u-hidden { display: none !important; }
.favorites-filter-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
}
@media (max-width: 900px) {
    .favorites-filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .favorites-filter-group > *:not(.favorites-search-wrap) {
        order: 1;
    }
    .favorites-search-wrap {
        order: 2;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
    }
}
.favorites-search-wrap {
    position: relative;
    flex: 0 0 auto;
    min-width: 240px;
    max-width: 420px;
    margin-right: auto;
}
.favorites-search-wrap .bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s ease;
}
.favorites-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}
.favorites-search-input:focus {
    outline: none;
    background: #252f3d;
    border-color: rgba(255, 255, 255, 0.2);
}
.favorites-search-input:focus ~ .bi-search,
.favorites-search-wrap:has(.favorites-search-input:focus) .bi-search {
    color: rgba(255, 255, 255, 0.8);
}
.favorites-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}
/* Arama kutusu temizleme butonu (çarpı işareti) - koyu gri */
.favorites-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M12 4L4 12M4 4l8 8' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.favorites-search-input::-webkit-search-cancel-button:hover {
    opacity: 1;
}
@media (hover: hover) {
    .favorites-search-input:hover {
        background: #252f3d;
        border-color: rgba(255, 255, 255, 0.16);
    }
    .favorites-search-input:hover ~ .bi-search,
    .favorites-search-wrap:has(.favorites-search-input:hover) .bi-search {
        color: rgba(255, 255, 255, 0.7);
    }
}
body:not(.dark) .favorites-search-input::-webkit-search-cancel-button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M12 4L4 12M4 4l8 8' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
body:not(.dark) .favorites-search-input {
    background: #f3f4f6;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #111827;
}
body:not(.dark) .favorites-search-input:focus {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
}
body:not(.dark) .favorites-search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}
body:not(.dark) .favorites-search-wrap .bi-search {
    color: rgba(0, 0, 0, 0.5);
}
@media (hover: hover) {
    body:not(.dark) .favorites-search-input:hover {
        background: #ffffff;
        border-color: rgba(0, 0, 0, 0.12);
    }
}
.favorites-clear-row {
    margin-bottom: 16px;
}
.favorites-clear-row.u-hidden { display: none !important; }
/* Ana sayfa ile aynı kart boyutları (yenilemede tutarlı görünüm) - ÇOK SPESİFİK KURALLAR */
/* favorites.html için */
body.page-favorites .favorites-grid,
body.page-favorites #favorites-grid {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 10px 20px 120px !important; /* Alt padding artırıldı - footer için daha fazla boşluk */
    padding-top: 20px !important; /* Üst padding azaltıldı - içerik kartları yukarı alındı */
    display: grid !important;
    grid-template-columns: repeat(6, 180px) !important;
    gap: 8px !important;
    justify-content: start !important;
    justify-items: start !important;
    box-sizing: border-box !important;
}

/* Boş durum mesajı için grid'i ortala */
body.page-favorites #favorites-grid:has(.favorites-empty-state),
body.page-favorites .favorites-grid:has(.favorites-empty-state) {
    justify-content: center !important;
    justify-items: center !important;
}

/* :has() desteği olmayan tarayıcılar için fallback */
body.page-favorites #favorites-grid .favorites-empty-state,
body.page-favorites .favorites-grid .favorites-empty-state {
    justify-self: center !important;
    align-self: center !important;
}
/* index.html'deki favoriler sekmesi için grid layout - favorites.html ile aynı */
body.tab-favorites #movie-grid,
body.tab-favorites .movie-grid {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 10px 20px 150px !important; /* Yan padding azaltıldı - 6 kart sığması için */
    display: grid !important;
    grid-template-columns: repeat(6, 180px) !important;
    gap: 8px !important;
    justify-content: start !important;
    justify-items: start !important;
    min-height: 80vh !important; /* Grid'in minimum yüksekliği artırıldı */
    height: auto !important;
    box-sizing: border-box !important;
}
@media (min-width: 1160px) {
    /* 6 kart için minimum genişlik: 6×180px + 5×8px (gap) + 40px (padding) = 1168px */
    body.page-favorites .favorites-grid,
    body.page-favorites #favorites-grid,
    body.tab-favorites #movie-grid {
        grid-template-columns: repeat(6, 180px) !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}
@media (max-width: 1159px) and (min-width: 1000px) {
    /* Orta ekranlarda 5 kart */
    body.page-favorites .favorites-grid,
    body.page-favorites #favorites-grid,
    body.tab-favorites #movie-grid {
        grid-template-columns: repeat(5, 180px) !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}
@media (max-width: 999px) {
    body.page-favorites .favorites-grid,
    body.page-favorites #favorites-grid,
    body.tab-favorites #movie-grid {
        grid-template-columns: repeat(auto-fill, 180px) !important;
    }
}
@media (max-width: 900px) {
    body.page-favorites .favorites-grid,
    body.page-favorites #favorites-grid,
    body.tab-favorites #movie-grid,
    body.tab-favorites .movie-grid {
        grid-template-columns: repeat(auto-fill, 140px) !important;
        padding: 10px 12px 150px !important;
        min-height: 80vh !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Mobil görünümde kartlar grid kolonlarını tamamen doldurmalı */
    body.page-favorites .favorites-grid .movie-card,
    body.page-favorites #favorites-grid .movie-card,
    body.tab-favorites #movie-grid .movie-card,
    body.tab-favorites .movie-grid .movie-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    body.tab-favorites main#catalog.section,
    body.tab-favorites main.section#catalog,
    body.tab-favorites #catalog.section {
        padding-bottom: 150px !important;
        min-height: 120vh !important;
    }
}
@media (max-width: 600px) {
    body.page-favorites .favorites-grid,
    body.page-favorites #favorites-grid,
    body.tab-favorites #movie-grid,
    body.tab-favorites .movie-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 10px 12px 150px !important;
        justify-content: stretch !important;
        justify-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-height: 80vh !important;
    }
    /* Mobil görünümde kartlar grid kolonlarını tamamen doldurmalı */
    body.page-favorites .favorites-grid .movie-card,
    body.page-favorites #favorites-grid .movie-card,
    body.tab-favorites #movie-grid .movie-card,
    body.tab-favorites .movie-grid .movie-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    body.tab-favorites main#catalog.section,
    body.tab-favorites main.section#catalog,
    body.tab-favorites #catalog.section {
        padding-bottom: 150px !important;
        min-height: 120vh !important;
    }
}

/* catalog-cinematic.css'teki body.tab-movies ve body.tab-series stillerini override et */
body.page-favorites .favorites-grid,
body.page-favorites #favorites-grid,
body.page-favorites .movie-grid.favorites-grid,
body.tab-favorites #movie-grid {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 10px 20px 120px !important; /* Alt padding artırıldı - footer için daha fazla boşluk */
    display: grid !important;
    grid-template-columns: repeat(6, 180px) !important;
    gap: 8px !important;
    justify-content: start !important;
    justify-items: start !important;
    box-sizing: border-box !important;
}

/* Boş durum mesajı için grid'i ortala */
body.page-favorites #favorites-grid:has(.favorites-empty-state),
body.page-favorites .favorites-grid:has(.favorites-empty-state),
body.page-favorites .movie-grid.favorites-grid:has(.favorites-empty-state) {
    justify-content: center !important;
    justify-items: center !important;
}

body.page-favorites #favorites-grid .favorites-empty-state,
body.page-favorites .favorites-grid .favorites-empty-state,
body.page-favorites .movie-grid.favorites-grid .favorites-empty-state {
    justify-self: center !important;
    align-self: center !important;
}

/* style.css'teki genel .section stillerini override et */
body.page-favorites main.section.favorites-standalone-main,
body.page-favorites .section.favorites-standalone-main,
body.page-favorites main.favorites-standalone-main.section {
    flex: 1 0 auto !important;
    min-height: 130vh !important; /* Artırıldı - footer daha aşağıda */
    padding-top: 40px !important; /* Azaltıldı - filtreleme bölümü yukarı alındı */
    padding-bottom: 80px !important; /* Alt padding artırıldı - footer için daha fazla boşluk */
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-100) !important;
    margin-left: 0 !important;
    color: var(--text-100) !important;
}
/* index.html'deki favoriler sekmesi için section override - EN GÜÇLÜ */
body.tab-favorites main#catalog.section,
body.tab-favorites main.section#catalog,
body.tab-favorites #catalog.section,
body.tab-favorites main.section,
body.tab-favorites main#catalog,
body.tab-favorites #catalog {
    flex: 1 0 auto !important;
    min-height: 120vh !important; /* Footer'ın görünmemesi için yeterince yüksek */
    padding-top: 24px !important;
    padding-bottom: 150px !important; /* Footer için maksimum boşluk */
    display: block !important;
    background: var(--bg-100) !important;
    margin-left: 0 !important;
    color: var(--text-100) !important;
    position: relative !important;
    height: auto !important;
}


/* ============================================
   INDEX.HTML FAVORİLER SEKMESİ İÇİN EN GÜÇLÜ OVERRIDE KURALLARI
   Anasayfadan favoriler sekmesine geçildiğinde footer her zaman altta
   DOSYANIN EN SONUNDA - HİÇBİR STİL BUNLARI OVERRIDE EDEMEZ
   ============================================ */
body.tab-favorites {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    height: auto !important;
}
/* style.css'teki main#catalog.section kuralını kesinlikle override et */
body.tab-favorites main#catalog.section,
body.tab-favorites main.section#catalog,
body.tab-favorites #catalog.section,
body.tab-favorites main.section,
body.tab-favorites main#catalog,
body.tab-favorites #catalog {
    flex: 1 0 auto !important;
    min-height: 120vh !important; /* Footer'ın görünmemesi için yeterince yüksek */
    padding-top: 24px !important;
    padding-bottom: 150px !important; /* Footer için maksimum boşluk */
    display: block !important;
    background: var(--bg-100) !important;
    position: relative !important;
    height: auto !important;
}
/* Grid için minimum yükseklik ve padding */
body.tab-favorites #movie-grid,
body.tab-favorites .movie-grid {
    min-height: 80vh !important; /* Grid'in minimum yüksekliği artırıldı */
    padding-bottom: 150px !important; /* Footer için maksimum boşluk */
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 10px 40px 150px !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 180px) !important;
    gap: 8px !important;
    justify-content: start !important;
    justify-items: start !important;
    height: auto !important;
}
@media (max-width: 900px) {
    body.tab-favorites main#catalog.section,
    body.tab-favorites main.section#catalog,
    body.tab-favorites #catalog.section {
        padding-bottom: 150px !important;
        min-height: 120vh !important;
    }
    body.tab-favorites #movie-grid,
    body.tab-favorites .movie-grid {
        padding-bottom: 150px !important;
        padding: 10px 30px 150px !important;
        min-height: 80vh !important;
    }
}
@media (max-width: 600px) {
    body.tab-favorites main#catalog.section,
    body.tab-favorites main.section#catalog,
    body.tab-favorites #catalog.section {
        padding-bottom: 150px !important;
        min-height: 120vh !important;
    }
    body.tab-favorites #movie-grid,
    body.tab-favorites .movie-grid {
        padding-bottom: 150px !important;
        padding: 10px 20px 150px !important;
        min-height: 80vh !important;
    }
}

/* ============================================
   SON ÇARE: EN GÜÇLÜ OVERRIDE KURALLARI
   Dosyanın en sonunda - hiçbir şey bunları override edemez
   ============================================ */
html body.tab-favorites {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    height: auto !important;
}
html body.tab-favorites main#catalog.section,
html body.tab-favorites main.section#catalog,
html body.tab-favorites #catalog.section,
html body.tab-favorites main.section,
html body.tab-favorites main#catalog,
html body.tab-favorites #catalog {
    flex: 1 0 auto !important;
    min-height: 120vh !important;
    padding-top: 24px !important;
    padding-bottom: 150px !important;
    display: block !important;
    background: var(--bg-100) !important;
    position: relative !important;
    height: auto !important;
}
html body.tab-favorites #movie-grid,
html body.tab-favorites .movie-grid {
    min-height: 80vh !important;
    padding-bottom: 150px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 10px 40px 150px !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 180px) !important;
    gap: 8px !important;
    justify-content: start !important;
    justify-items: start !important;
    height: auto !important;
}
@media (max-width: 900px) {
    html body.tab-favorites main#catalog.section,
    html body.tab-favorites main.section#catalog {
        padding-bottom: 150px !important;
        min-height: 120vh !important;
    }
    html body.tab-favorites #movie-grid,
    html body.tab-favorites .movie-grid {
        padding: 10px 30px 150px !important;
        min-height: 80vh !important;
    }
}
@media (max-width: 600px) {
    html body.tab-favorites main#catalog.section,
    html body.tab-favorites main.section#catalog {
        padding-bottom: 150px !important;
        min-height: 120vh !important;
    }
    html body.tab-favorites #movie-grid,
    html body.tab-favorites .movie-grid {
        padding: 10px 20px 150px !important;
        min-height: 80vh !important;
    }
}
/* Filtrele bölümü navbar içinde görünmesin - favoriler sekmesi için */
/* İlk başta gizle - clearRow içine taşındıktan sonra gösterilecek */
body.tab-favorites .filters-after-discover:not(.favorites-clear-row *) {
    display: none !important;
}
body.tab-favorites .favorites-clear-row .filters-after-discover {
    display: block !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box !important;
}
body.tab-favorites main#catalog .filters-after-discover,
body.tab-favorites main.section#catalog .filters-after-discover,
body.tab-favorites #catalog .filters-after-discover {
    position: relative !important;
    padding: 20px clamp(24px, 5vw, 48px) 24px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
body.tab-favorites .filters-container {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    padding: 14px 20px !important;
    border-radius: 8px !important;
    background: #181818 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    font-family: Inter, system-ui, -apple-system, sans-serif !important;
    position: relative !important;
    margin: 0 !important;
    width: fit-content !important;
    max-width: fit-content !important;
    min-width: auto !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
}
