/**
 * Modern Manga Reactions & Comments Premium Theme
 * Matches the uploaded dark purple/navy webtoon app UI exactly.
 */

:root {
    --mw-bg-main: #0d0a14;
    --mw-bg-card: #14101c;
    --mw-bg-card-inner: #191424;
    --mw-bg-input: #120e1a;
    --mw-border: #261f36;
    --mw-border-focus: #7c3aed;
    --mw-primary: #6366f1;
    --mw-primary-gradient: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    --mw-text: #f3f4f6;
    --mw-text-muted: #9ca3af;
    --mw-text-dim: #6b7280;
    --mw-like-red: #f43f5e;
    --mw-dislike-blue: #64748b;
}

#madara-comments {
    background: var(--mw-bg-main);
    padding: 30px 25px;
    border-radius: 20px;
    border: 1px solid var(--mw-border);
    margin-top: 40px;
    color: var(--mw-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* --- 1. TEPKİLER KUTUSU --- */
.manga-reactions-wrapper {
    background: transparent;
    border: none;
    padding: 10px 0 35px 0;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 1px solid var(--mw-border);
}

.reactions-header {
    margin-bottom: 25px;
}

.reactions-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
}

.reactions-title span {
    color: #a78bfa;
}

.reactions-total-pill {
    display: inline-block;
    background: #1c1628;
    color: #9ca3af;
    font-size: 13px;
    padding: 5px 16px;
    border-radius: 30px;
    border: 1px solid #2d243f;
    font-weight: 600;
}

.reactions-list {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.reaction-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 95px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.reaction-item:hover {
    transform: translateY(-5px);
}

.reaction-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1e172c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    border: 2px solid #332749;
    transition: all 0.25s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.reaction-item:hover .reaction-circle {
    border-color: #6366f1;
    background: #251c38;
}

.reaction-item.active .reaction-circle {
    border-color: #a855f7;
    background: #3b185f;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    transform: scale(1.08);
}

.reaction-count-pill {
    background: #161122;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 14px;
    margin-top: -14px;
    border: 1px solid #3b2d54;
    z-index: 2;
    min-width: 36px;
    text-align: center;
}

.reaction-item.active .reaction-count-pill {
    background: #7c3aed;
    border-color: #a78bfa;
}

.reaction-label {
    margin-top: 10px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

/* --- 2. YORUMLAR ÜST BAR VE SIRALAMA --- */
.manga-comments-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
}

.manga-comments-top-bar .comments-count-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manga-comments-top-bar .comments-count-title span {
    color: var(--mw-text-dim);
    font-size: 17px;
    font-weight: 600;
}

.manga-comments-sort-tabs {
    display: flex;
    gap: 4px;
    background: #161122;
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--mw-border);
}

.manga-comments-sort-tabs a {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.manga-comments-sort-tabs a:hover {
    color: #ffffff;
}

.manga-comments-sort-tabs a.active {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* --- 3. YORUM KURALLARI --- */
.manga-comment-rules-accordion {
    margin-bottom: 25px;
    border: 1px solid var(--mw-border);
    background: #140f1f;
    border-radius: 12px;
    overflow: hidden;
}

.rules-toggle-btn {
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: all 0.2s ease;
}

.rules-toggle-btn:hover {
    color: #ffffff;
    background: #1b1429;
}

.rules-content {
    display: none;
    padding: 15px 20px;
    font-size: 13px;
    color: #9ca3af;
    border-top: 1px solid var(--mw-border);
    line-height: 1.7;
    background: #0f0b18;
}

.rules-content ul {
    margin: 0;
    padding-left: 20px;
}

/* --- 4. GİRİŞ KİLİDİ (GÖRSELDEKİ KİLİT KUTUSU) --- */
.manga-guest-lock-box {
    background: radial-gradient(circle at center, #1b1429 0%, #110d1a 100%);
    border: 1px solid #332749;
    border-radius: 16px;
    padding: 45px 25px;
    text-align: center;
    margin-bottom: 35px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.manga-guest-lock-box .lock-svg-wrap {
    width: 50px;
    height: 50px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.manga-guest-lock-box p {
    color: #d1d5db;
    font-size: 15px;
    margin: 0 auto 22px auto;
    max-width: 360px;
    line-height: 1.5;
}

.manga-guest-lock-box .auth-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.manga-guest-lock-box .btn-manga-auth {
    padding: 9px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-manga-auth.btn-login {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}
.btn-manga-auth.btn-login:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

.btn-manga-auth.btn-register {
    background: #1c152a;
    color: #d1d5db;
    border: 1px solid #3d3156;
}
.btn-manga-auth.btn-register:hover {
    background: #251c38;
    color: #ffffff;
    border-color: #554477;
}

/* --- 5. YORUM LİSTESİ VE KART TASARIMI --- */
#madara-comments ol.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#madara-comments .comment-body {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #1c1628;
    position: relative;
}

/* Yanıtlanan yorumlar için ağaç stili */
#madara-comments .children {
    list-style: none;
    padding-left: 45px;
    margin-top: 10px;
    border-left: 2px solid #231b32;
}

#madara-comments .comment-avatar img {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#madara-comments .block-right {
    flex: 1;
}

/* En beğenilen yorum sol mor çizgi ve rozet */
.comment.is-top-comment > .comment-body {
    border-left: 3px solid #7c3aed;
    padding-left: 18px;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.08) 0%, transparent 100%);
}

.badge-top-comment {
    display: inline-block;
    color: #a78bfa;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-author-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.comment-author-header .author-name {
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
    text-decoration: none;
}

.comment-author-header .comment-time {
    font-size: 12px;
    color: var(--mw-text-dim);
}

.comment-text-content {
    font-size: 14px;
    color: #e5e7eb;
    line-height: 1.6;
    margin-bottom: 12px;
    word-break: break-word;
}

/* --- 6. İKONİK BEĞEN (LIKE) & BEĞENME (DISLIKE) BUTONLARI --- */
.comment-footer-toolbar {
    display: flex;
    align-items: center;
    gap: 18px;
}

.comment-vote-group {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.btn-comment-vote {
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-comment-vote svg {
    width: 17px;
    height: 17px;
    transition: all 0.2s ease;
    stroke: currentColor;
    fill: none;
}

.btn-comment-vote:hover {
    color: #ffffff;
}

/* Like Aktif Durumu (Kırmızı Kalp) */
.btn-comment-vote.btn-like:hover svg {
    stroke: var(--mw-like-red);
}
.btn-comment-vote.btn-like.voted {
    color: var(--mw-like-red);
}
.btn-comment-vote.btn-like.voted svg {
    stroke: var(--mw-like-red);
    fill: var(--mw-like-red);
    transform: scale(1.15);
}

/* Dislike Aktif Durumu */
.btn-comment-vote.btn-dislike:hover svg {
    stroke: #94a3b8;
}
.btn-comment-vote.btn-dislike.voted {
    color: #94a3b8;
}
.btn-comment-vote.btn-dislike.voted svg {
    stroke: #94a3b8;
    fill: #94a3b8;
    transform: scale(1.15);
}

/* Yanıtla Butonu */
.comment-reply-action a {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.comment-reply-action a:hover {
    color: #6366f1;
}

/* Yanıtları Göster / Gizle Tıklanabilir Linki */
.comment-children-toggle {
    color: #a78bfa;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.comment-children-toggle:hover {
    color: #c084fc;
}

/* --- 7. AKTİF YORUM FORMU STİLİ --- */
#madara-comments .comment-respond {
    background: #14101e;
    border: 1px solid var(--mw-border);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 30px;
}

#madara-comments textarea#comment {
    background: #0f0b18;
    border: 1px solid #2d243f;
    border-radius: 10px;
    color: #ffffff;
    padding: 14px;
    font-size: 14px;
    width: 100%;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#madara-comments textarea#comment:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

#madara-comments input#submit {
    background: #6366f1;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#madara-comments input#submit:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}


/* --- AVATAR VE İSİM ARASINDAKİ BOŞLUĞU DÜZELTME --- */
#madara-comments.comments-area ol.comment-list li.comment article.comment-body,
#madara-comments.comments-area ol.comment-list li.pingback article.comment-body,
#madara-comments .comment-body {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 16px 0 !important;
}

#madara-comments.comments-area ol.comment-list li.comment article.comment-body .block-left,
#madara-comments.comments-area ol.comment-list li.pingback article.comment-body .block-left,
#madara-comments .block-left {
    float: none !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    margin-right: 0 !important;
    margin-top: 2px !important;
}

#madara-comments .block-left .comment-avatar,
#madara-comments .block-left .comment-avatar img,
#madara-comments .block-left img.avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    display: block !important;
}

#madara-comments.comments-area ol.comment-list li.comment article.comment-body .block-right,
#madara-comments.comments-area ol.comment-list li.pingback article.comment-body .block-right,
#madara-comments .block-right {
    float: none !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#madara-comments .comment-author-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
}

#madara-comments .comment-author-header .author-name,
#madara-comments .comment-author-header .author-name a {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
}

#madara-comments .comment-author-header .comment-time {
    font-size: 12px !important;
    color: #9ca3af !important;
}

/* --- DAHA FAZLA YORUM GOSTER (LOAD MORE) BUTONU (Gorsel 2) --- */
.manga-load-more-comments-wrap {
    text-align: center;
    margin: 35px 0 15px 0;
}

.btn-load-more-comments {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #14101d;
    color: #c4b5fd;
    border: 1px solid #3b2a5a;
    padding: 10px 28px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-load-more-comments:hover {
    background: #201733;
    border-color: #7c3aed;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
    transform: translateY(-1px);
}

.btn-load-more-comments:active {
    transform: translateY(0);
}

/* Gizlenen yorumlar */
#madara-comments ol.comment-list > li.comment.comment-hidden {
    display: none !important;
}
