/* =============================================================
   SUBTITLES.PHP — ANİME DETAY V8.0 — ANILIST DESIGN SYSTEM
   V8.0: ad- prefix → an- prefix (reklam engelleyici uyumluluğu)
         Altyazı yorumları sekmesi
   ============================================================= */

.an-page { max-width: 1200px; margin: 0 auto; padding: 0 2rem 3rem; }

/* --- Hero Banner --- */
.an-hero {
    position: relative;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}
.an-hero-visual {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}
.an-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    filter: blur(30px) brightness(0.35) saturate(1.3);
    transform: scale(1.15);
}
.an-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,22,34,0.4) 0%, rgba(11,22,34,0.92) 100%);
}
.an-hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 2rem;
    padding: 2.5rem;
    align-items: flex-end;
}
.an-hero-poster { flex-shrink: 0; width: 200px; }
.an-hero-poster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.1);
}
.an-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Breadcrumb */
.an-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}
.an-breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.15s; }
.an-breadcrumb a:hover { color: var(--accent); }
.an-breadcrumb i { font-size: 0.6rem; }

/* Anime Title */
.an-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.an-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
}

/* Spec Pills */
.an-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.an-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}
.an-pill i { font-size: 0.7rem; opacity: 0.7; }

/* Genre Tags */
.an-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.an-genre {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--accent-surface);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
}
.an-genre:hover { background: var(--accent); color: #000; }

/* Action Row */
.an-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.3rem; }
.an-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}
.an-btn:hover { background: rgba(255,255,255,0.12); color: #fff; transform: translateY(-1px); }
.an-btn.an-btn-accent { background: var(--accent); color: #000; border-color: var(--accent); }
.an-btn.an-btn-accent:hover { box-shadow: 0 4px 20px var(--accent-glow); }
.an-btn.an-btn-active { background: var(--accent); color: #000; border-color: var(--accent); }
.an-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Watchlist Dropdown */
.an-wl-wrap { position: relative; display: inline-flex; }
.an-wl-main {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
}
.an-wl-main:hover { background: rgba(255,255,255,0.12); color: #fff; }
.an-wl-main.active { background: var(--accent); color: #000; border-color: var(--accent); }
.an-wl-main:disabled { opacity: 0.5; cursor: not-allowed; }
.an-wl-dd-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    padding: 9px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid rgba(255,255,255,0.12);
    border-left: none;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
}
.an-wl-dd-toggle:hover { background: rgba(255,255,255,0.12); color: #fff; }
.an-wl-dd-toggle.active { background: var(--accent); color: #000; border-color: var(--accent); border-left: 1px solid rgba(0,0,0,0.15); }
.an-wl-dd-toggle:disabled { opacity: 0.5; cursor: not-allowed; }
.an-wl-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    padding: 6px;
    animation: anWlDdFade 0.15s ease;
}
.an-wl-dropdown.show { display: block; }
@keyframes anWlDdFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.an-wl-dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.1s;
}
.an-wl-dd-item:hover { background: var(--bg-hover); color: var(--text-bright); }
.an-wl-dd-item.current { background: var(--accent-surface); color: var(--accent); }
.an-wl-dd-item i { width: 16px; text-align: center; font-size: 0.75rem; }
.an-wl-dd-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 6px;
}
.an-wl-dd-item.remove { color: var(--red); }
.an-wl-dd-item.remove:hover { background: rgba(239,83,80,0.1); }

/* --- Layout --- */
.an-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}
.an-main, .an-sidebar { min-width: 0; }

/* Widget */
.an-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.an-widget-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-bright);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.an-widget-head i { color: var(--accent); font-size: 0.9rem; }
.an-widget-head .an-head-right { margin-left: auto; }

/* --- Stats Bar --- */
.an-stats-bar { display: flex; gap: 1.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.an-stat-item { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.an-stat-item i { color: var(--accent); font-size: 0.78rem; }
.an-stat-item strong { color: var(--text-bright); }

/* --- Torrent Search --- */
.an-torrent-search { background: var(--bg-secondary); border-radius: var(--radius); padding: 1.25rem; }
.an-form-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.an-form-group { flex: 1; min-width: 120px; }
.an-form-group label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; display: block; }
.an-form-group input, .an-form-group select { width: 100%; background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; font-size: 0.85rem; font-family: var(--font); outline: none; transition: border-color 0.15s; box-sizing: border-box; }
.an-form-group input:focus, .an-form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.an-torrent-results { margin-top: 1rem; display: none; }
.an-torrent-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border); margin-bottom: 6px; transition: all 0.15s; }
.an-torrent-item:hover { border-color: var(--border-light); }
.an-torrent-seed { width: 52px; text-align: center; flex-shrink: 0; }
.an-torrent-seed strong { color: var(--green); font-weight: 800; font-size: 0.9rem; }
.an-torrent-seed small { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.an-torrent-name { flex: 1; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); word-break: break-word; }
.an-torrent-links { white-space: nowrap; display: flex; gap: 8px; }
.an-torrent-links a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.15s; }
.an-torrent-links a:hover { color: var(--accent); }

/* --- Subtitle List --- */
.an-sub-list { display: flex; flex-direction: column; gap: 8px; }
.an-sub-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--bg-secondary); border: 1px solid transparent; transition: all 0.15s; }
.an-sub-item:hover { border-color: var(--border-light); background: var(--bg-hover); }
.an-sub-item input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.an-sub-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); }
.an-sub-info { flex: 1; min-width: 0; }
.an-sub-title { font-size: 0.9rem; font-weight: 700; color: var(--text-bright); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-sub-title a { color: var(--text-bright); text-decoration: none; }
.an-sub-title a:hover { color: var(--accent); }
.an-sub-fansub { color: var(--accent); font-weight: 700; text-decoration: none; }
.an-sub-fansub:hover { text-decoration: underline; }
.an-source-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: var(--radius-sm); font-size: 0.68rem; line-height: 1; font-weight: 800; letter-spacing: 0; text-transform: uppercase; border: 1px solid transparent; }
.an-source-badge.bluray { color: #8bd3ff; background: rgba(61,180,242,0.12); border-color: rgba(61,180,242,0.2); }
.an-source-badge.web { color: #9be28f; background: rgba(76,202,81,0.12); border-color: rgba(76,202,81,0.2); }
.an-sub-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; font-weight: 600; }
.an-sub-meta i { margin-right: 3px; }
.an-sub-arrow { color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0; transition: color 0.15s; }
.an-sub-item:hover .an-sub-arrow { color: var(--accent); }
.an-bulk-bar { display: flex; justify-content: flex-end; margin-bottom: 0.75rem; }

/* --- Description --- */
.an-description { font-size: 0.88rem; line-height: 1.75; color: var(--text-secondary); word-break: break-word; max-height: 300px; overflow-y: auto; }
.an-desc-editor textarea { width: 100%; min-height: 180px; padding: 12px; background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font); font-size: 0.88rem; resize: vertical; outline: none; box-sizing: border-box; }
.an-desc-editor textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* --- Similar Anime --- */
.an-similar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.an-similar-card { display: block; position: relative; border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: all 0.2s; }
.an-similar-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.an-similar-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.an-similar-meta { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px 10px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); }
.an-similar-title { font-size: 0.78rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Watchlist Users Widget --- */
.an-wl-users-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.an-wl-user {
    position: relative;
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    overflow: visible;
}
.an-wl-user img {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--bg-card);
    transition: all 0.15s;
    display: block;
}
.an-wl-user:hover img { border-color: var(--accent); transform: scale(1.1); }
.an-wl-user-dot {
    position: absolute;
    bottom: -1px; right: -1px;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.an-wl-user-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-bright);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 10;
    pointer-events: none;
}
.an-wl-user:hover .an-wl-user-tooltip { display: block; }
.an-wl-more {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
}
.an-wl-dist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.an-wl-dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
}
.an-wl-dist-row .dist-icon { width: 14px; text-align: center; font-size: 0.65rem; }
.an-wl-dist-row .dist-label { flex: 1; color: var(--text-secondary); }
.an-wl-dist-row .dist-count { color: var(--text-bright); font-weight: 700; }
.an-wl-dist-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--bg-tertiary);
    overflow: hidden;
    margin-top: 6px;
    display: flex;
}
.an-wl-dist-bar-seg { height: 100%; transition: width 0.4s ease; }

/* --- Comment Tabs --- */
.an-comment-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
}
.an-comment-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.an-comment-tab:hover { color: var(--text-bright); }
.an-comment-tab.active { color: var(--accent); }
.an-comment-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}
.an-comment-tab .an-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    font-size: 0.7rem;
    font-weight: 800;
}
.an-comment-tab.active .an-tab-count {
    background: var(--accent-surface);
    color: var(--accent);
}
.an-comment-panel { display: none; }
.an-comment-panel.active { display: block; }

/* --- Subtitle Comment Group --- */
.an-sub-comment-group {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.an-sub-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-bright);
    cursor: pointer;
    transition: background 0.15s;
}
.an-sub-comment-header:hover { background: var(--bg-hover); }
.an-sub-comment-header i.toggle-icon { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); transition: transform 0.2s; }
.an-sub-comment-header.collapsed i.toggle-icon { transform: rotate(-90deg); }
.an-sub-comment-body { padding: 10px 14px; }
.an-sub-comment-body.collapsed { display: none; }
.an-sub-link { color: var(--accent); text-decoration: none; font-weight: 700; }
.an-sub-link:hover { text-decoration: underline; }
.an-sub-comment-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

/* --- Comments --- */
.an-comment-form textarea { width: 100%; min-height: 90px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-input); color: var(--text-primary); font-size: 0.88rem; font-family: var(--font); resize: vertical; outline: none; transition: border-color 0.15s; box-sizing: border-box; }
.an-comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.an-comment-form textarea::placeholder { color: var(--text-muted); }
.an-comment-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.an-comment-submit { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; background: var(--accent); color: #000; border: none; border-radius: var(--radius); font-family: var(--font); font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.an-comment-submit:hover { box-shadow: 0 4px 16px var(--accent-glow); }
.an-comment-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.an-cancel-reply { display: none; background: none; border: none; color: var(--text-muted); font-family: var(--font); font-size: 0.8rem; cursor: pointer; }
.an-cancel-reply:hover { color: var(--red); }
.an-comment { padding: 14px; border-radius: var(--radius); background: var(--bg-secondary); border: 1px solid var(--border); margin-bottom: 10px; }
.an-comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.an-comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.an-comment-user a { color: var(--accent); font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.an-comment-user a:hover { text-decoration: underline; }
.an-comment-date { margin-left: auto; color: var(--text-muted); font-size: 0.75rem; font-weight: 600; }
.an-comment-body { font-size: 0.88rem; line-height: 1.65; color: var(--text-primary); word-break: break-word; }
.an-comment-btns { display: flex; gap: 12px; margin-top: 8px; }
.an-comment-btn { background: none; border: none; color: var(--text-muted); font-family: var(--font); font-size: 0.78rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; transition: color 0.15s; }
.an-comment-btn:hover { color: var(--accent); }
.an-comment-btn.an-del-btn:hover { color: var(--red); }
.an-comment-msg { margin-top: 10px; font-weight: 600; font-size: 0.85rem; display: none; }
.an-login-prompt { background: var(--bg-secondary); padding: 1rem; border-radius: var(--radius); text-align: center; color: var(--text-muted); font-size: 0.88rem; }
.an-login-prompt a { color: var(--accent); font-weight: 700; text-decoration: none; }
.an-login-prompt a:hover { text-decoration: underline; }
.an-no-comments { text-align: center; padding: 1.5rem; color: var(--text-muted); font-size: 0.88rem; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .an-page { padding: 0 1rem 2rem; }
    .an-layout { grid-template-columns: 1fr; }
    .an-hero-content { flex-direction: column; align-items: center; text-align: center; padding: 2rem 1.5rem; }
    .an-hero-poster { width: 150px; }
    .an-hero-info { align-items: center; }
    .an-pills { justify-content: center; }
    .an-genres { justify-content: center; }
    .an-actions { justify-content: center; }
    .an-breadcrumb { justify-content: center; }
    .an-title { font-size: 1.5rem; }
    .an-similar-grid { grid-template-columns: repeat(4, 1fr); }
    .an-comment-tabs { overflow-x: auto; }
}
@media (max-width: 480px) {
    .an-hero-poster { width: 120px; }
    .an-similar-grid { grid-template-columns: repeat(2, 1fr); }
}
