/* --- RESET & VARIABLES --- */
:root {
    --bg-dark: #111820;
    --bg-card: #1c2630;
    --bg-modal: #161f29;
    --accent: #fee715;       /* Kuning Terang */
    --success: #00b894;      /* Hijau */
    --text-white: #ffffff;
    --text-gray: #b0b3b8;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --glow: 0 0 12px rgba(254, 231, 21, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}

/* --- HEADER --- */
header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 20px 0; 
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--accent); 
}

.logo span { 
    color: var(--text-white); 
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-lang-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-subtitle { 
    color: var(--text-gray); 
    font-size: 0.9rem; 
}

/* Hilangkan duplikat subtitle jika ada */
.filter-wrapper + .header-subtitle,
.container > .header-subtitle:not(:first-child) {
    display: none !important;
}

/* --- TOMOBOL BAHASA DENGAN ANIMASI --- */
.lang-btn {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(254,231,21,0.15), transparent);
    transition: left 0.6s;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn:hover {
    background: rgba(254,231,21,0.08);
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: var(--glow);
    border-color: transparent;
}

/* --- FILTER --- */
.filter-wrapper {
    margin: 15px 0 25px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.filter-btn {
    position: relative;
    overflow: hidden;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.filter-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: var(--glow);
}

/* --- GRID SYSTEM --- */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 25px;
    justify-content: center;
}

/* --- CARD DESIGN --- */
.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    cursor: pointer;
    display: flex; flex-direction: column;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(254, 231, 21, 0.1);
}

.card-image {
    width: 100%; 
    aspect-ratio: 2/3; 
    overflow: hidden; 
    position: relative;
}

.card-image::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75), rgba(0,0,0,0.4), rgba(0,0,0,0));
    pointer-events: none;
    z-index: 1;
}

.card-image img:not(.lang-flag) {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image img { transform: scale(1.1); }

/* --- STATUS BADGE & FLAGS --- */
.status-badge {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
    z-index: 2; display: flex; align-items: center; gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.status-ongoing { background-color: var(--accent); color: var(--bg-dark); }
.status-completed { background-color: var(--success); color: white; }

.lang-flags {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;  /* penting untuk sejajar vertikal */
    gap: 6px;
    z-index: 3;
}

.lang-flags img {
    width: 26px;
    height: 18px;
    object-fit: fill;                 /* stretch ENG agar memenuhi tinggi 18px seperti ID */
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* --- CONTENT CARD --- */
.card-content { 
    padding: 15px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
}

.manga-title {
    font-size: 1rem; 
    font-weight: 600; 
    margin-bottom: 8px;
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    overflow: hidden;
}

.manga-info { 
    margin-bottom: 8px; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 5px;
}

.genre-tag {
    font-size: 0.7rem; 
    padding: 2px 8px; 
    border-radius: 4px;
    background-color: rgba(254, 231, 21, 0.1);
    color: var(--accent); 
    white-space: nowrap;
}

.chapter-text {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chapter-text i { color: var(--accent); font-size: 0.7rem; }

/* --- BUTTON LINK CARD --- */
.btn-read {
    display: block; width: 100%; padding: 8px 0;
    text-align: center; background-color: transparent;
    border: 1px solid var(--accent); color: var(--accent);
    font-size: 0.85rem; font-weight: 600; border-radius: 6px;
    text-decoration: none; transition: var(--transition);
    margin-top: auto;
}

.btn-read:hover { 
    background-color: var(--accent); 
    color: var(--bg-dark); 
}

/* --- MODAL - UI LENGKAP & UPGRADE --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(17, 24, 32, 0.92);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-modal);
    width: 90%;
    max-width: 860px;
    border-radius: 16px;
    border: 1px solid rgba(254, 231, 21, 0.25);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 30px rgba(254, 231, 21, 0.15);
    position: relative;
    animation: modalPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    display: flex;
    flex-direction: row;
    max-height: 92vh;
}

@keyframes modalPop {
    from { transform: scale(0.85) translateY(40px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
    z-index: 20;
    background: rgba(0,0,0,0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid rgba(254, 231, 21, 0.2);
}

.close-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    transform: rotate(90deg);
    box-shadow: var(--glow);
}

.modal-image {
    width: 40%;
    flex-shrink: 0;
    background: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-image, linear-gradient(135deg, #111820, #1c2630));
    background-size: cover;
    background-position: center;
    filter: blur(25px) brightness(0.6);
    transform: scale(1.15);
    z-index: 1;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.6));
    transition: transform 0.6s ease;
}

.modal-content:hover .modal-image img {
    transform: scale(1.04);
}

.modal-info-content {
    padding: 32px 28px;
    overflow-y: auto;
    width: 60%;
    display: flex;
    flex-direction: column;
}

.modal-info-content h2 {
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

#modalGenres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

#modalGenres .genre-tag {
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(254, 231, 21, 0.12);
    color: var(--accent);
    border: 1px solid rgba(254, 231, 21, 0.2);
}

#modalDetails {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.synopsis-label {
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--text-gray);
    font-size: 1.05rem;
}

.synopsis-text {
    line-height: 1.7;
    color: #e0e0e0;
    font-size: 0.98rem;
    text-align: justify;
}

.modal-btn {
    margin-top: auto;
    padding: 14px 0;
    font-size: 1.05rem;
    font-weight: 600;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 24px auto 0;
}

.modal-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}


/* --- ORDER FAB (Floating Action Button) --- */
.order-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 500;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #e6c800);
    color: var(--bg-dark);
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(254, 231, 21, 0.45);
    transition: var(--transition);
    animation: fabPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fabPop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.order-fab:hover {
    transform: scale(1.12) rotate(-8deg);
    box-shadow: 0 6px 28px rgba(254, 231, 21, 0.65);
}

/* --- ORDER INFO MODAL --- */
.order-info-modal .modal-content.order-info-modal-content {
    flex-direction: column;
    max-width: 480px;
    width: 92%;
    padding: 0;
    border: 1px solid rgba(254, 231, 21, 0.25);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px rgba(254, 231, 21, 0.12);
    max-height: 92vh;
    overflow-y: auto;
}

.order-info-header {
    text-align: center;
    padding: 30px 28px 18px;
    background: linear-gradient(180deg, rgba(254,231,21,0.07) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.order-info-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent), #e6c800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.2rem;
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(254,231,21,0.35);
}

.order-info-title {
    color: var(--accent);
    font-size: 1.4rem;
    font-weight: 700;
}

.order-info-lang-toggle {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.order-info-panel {
    padding: 22px 26px 28px;
}

.order-info-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: #e0e0e0;
    font-size: 0.92rem;
    line-height: 1.7;
}

.order-info-body > p:first-child {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.order-info-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 13px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-info-section-title {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 7px;
}

.order-info-section-title i {
    font-size: 0.85rem;
}

.order-info-section p {
    color: #d0d0d0;
    font-size: 0.87rem;
    line-height: 1.6;
    margin: 0;
}

.order-info-section strong {
    color: var(--accent);
}

.order-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #e1306c, #833ab4);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(225,48,108,0.35);
    font-family: 'Poppins', sans-serif;
    margin-top: 4px;
}

.order-info-btn:hover {
    background: linear-gradient(135deg, #f7466e, #9b4dca);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(225,48,108,0.5);
}

@media (max-width: 768px) {
    .order-fab {
        bottom: 20px;
        right: 16px;
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .order-info-modal .modal-content.order-info-modal-content {
        max-width: 96%;
        width: 96%;
        max-height: 88vh;
    }

    .order-info-header {
        padding: 22px 18px 14px;
    }

    .order-info-title {
        font-size: 1.2rem;
    }

    .order-info-panel {
        padding: 18px 16px 22px;
    }

    .order-info-body {
        font-size: 0.88rem;
    }
}

/* --- SUPPORT ME BUTTON --- */
.support-btn {
    background: linear-gradient(135deg, #e84393, #c0306e);
    border: none;
    color: #fff;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(232, 67, 147, 0.35);
    letter-spacing: 0.3px;
}

.support-btn i {
    font-size: 0.78rem;
    animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.2); }
    70% { transform: scale(1); }
}

.support-btn:hover {
    background: linear-gradient(135deg, #ff5aaa, #e84393);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(232, 67, 147, 0.6);
}

/* --- SUPPORT MODAL OVERRIDES --- */
.support-modal .modal-content.support-modal-content {
    flex-direction: column;
    max-width: 440px;
    width: 92%;
    padding: 0;
    border: 1px solid rgba(232, 67, 147, 0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px rgba(232, 67, 147, 0.15);
    max-height: 92vh;
    overflow-y: auto;
}

.support-header {
    text-align: center;
    padding: 32px 28px 20px;
    background: linear-gradient(180deg, rgba(232,67,147,0.08) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.support-icon {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #e84393, #c0306e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.3rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(232,67,147,0.4);
    animation: heartbeat 1.4s ease-in-out infinite;
}

.support-title {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.support-subtitle {
    color: var(--text-gray);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* --- LANG TOGGLE TABS --- */
.support-lang-toggle {
    display: flex;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.support-lang-tab {
    flex: 1;
    padding: 12px 10px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    font-family: 'Poppins', sans-serif;
}

.support-lang-tab img {
    width: 22px;
    height: 15px;
    object-fit: fill;
    border-radius: 3px;
}

.support-lang-tab:hover {
    color: var(--text-white);
    background: rgba(255,255,255,0.04);
}

.support-lang-tab.active {
    color: #e84393;
    border-bottom: 2px solid #e84393;
    background: rgba(232,67,147,0.06);
}

/* --- SUPPORT PANELS --- */
.support-panel {
    padding: 24px 28px 28px;
}

.support-qr-wrapper,
.support-kofi-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.qr-label {
    color: var(--text-gray);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.qr-frame {
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(232,67,147,0.2);
    display: inline-flex;
}

.qr-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.qr-note {
    color: var(--text-gray);
    font-size: 0.78rem;
    text-align: center;
    max-width: 260px;
    line-height: 1.5;
}

/* Ko-fi specifics */
.kofi-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 16px;
    width: 100%;
    max-width: 280px;
}

.kofi-profile-img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(232,67,147,0.4);
}

.kofi-info {
    display: flex;
    flex-direction: column;
}

.kofi-name {
    font-weight: 700;
    color: var(--text-white);
    font-size: 0.95rem;
}

.kofi-platform {
    font-size: 0.75rem;
    color: #e84393;
    font-weight: 600;
}

.kofi-qr-frame {
    /* same as qr-frame, just inherits */
}

.kofi-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #e84393, #c0306e);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(232,67,147,0.35);
    font-family: 'Poppins', sans-serif;
}

.kofi-btn:hover {
    background: linear-gradient(135deg, #ff5aaa, #e84393);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232,67,147,0.55);
}

/* --- RESPONSIVE SUPPORT MOBILE --- */
@media (max-width: 768px) {
    .support-modal .modal-content.support-modal-content {
        max-width: 96%;
        width: 96%;
    }

    .support-header {
        padding: 24px 18px 16px;
    }

    .support-title {
        font-size: 1.25rem;
    }

    .support-panel {
        padding: 20px 18px 24px;
    }

    .qr-image {
        width: 170px;
        height: 170px;
    }
}
@media (max-width: 768px) {
    .container { padding: 10px; }
    
    .manga-grid {
        grid-template-columns: repeat(3, 1fr); 
        gap: 8px;
    }

    .card-content { padding: 8px 6px; } 
    
    .manga-title {
        font-size: 0.65rem; margin-bottom: 6px;
        line-height: 1.2;
    }

    .manga-info { 
        margin-bottom: 6px; 
        gap: 3px; 
    }

    .genre-tag { 
        font-size: 0.45rem; 
        padding: 2px 5px; 
        border-radius: 3px;
    }

    .chapter-text {
        font-size: 0.5rem; 
        margin-bottom: 8px;
        white-space: normal;
        line-height: 1.2;
    }

    .chapter-text i { font-size: 0.5rem; }
    .btn-read { font-size: 0.55rem; padding: 4px 0; }
    .btn-comment { font-size: 0.55rem; padding: 4px 0; gap: 3px; margin-top: 4px; border-width: 1px; border-radius: 6px; }
    .btn-comment i { font-size: 0.55rem; }
    
    .status-badge {
        font-size: 0.45rem; padding: 2px 5px;
        top: 5px; left: 5px; gap: 3px;
    }

    .lang-btn {
        padding: 3px 6px;
        font-size: 0.6rem;
    }

    .header-subtitle {
        font-size: 0.65rem;
    }

    /* Header mobile: logo kiri, kanan susun vertikal */
    header {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 14px 0;
    }

    .header-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }

    .header-lang-group {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .support-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
        gap: 5px;
        border-radius: 7px;
    }

    .support-btn i {
        font-size: 0.65rem;
    }

    /* Tombol komentar mobile - samakan ukuran dengan btn-read */
    .btn-comment {
        font-size: 0.55rem;
        padding: 4px 0;
        gap: 3px;
        margin-top: 4px;
        border-width: 1px;
        border-radius: 6px;
    }
    .btn-comment i { font-size: 0.55rem; }

    .lang-flags {
        top: 6px !important;
        right: 6px !important;
    }

    .lang-flags img {
        width: 14px !important;
        height: 10px !important;
        object-fit: fill;   /* stretch ENG agar tinggi sama dengan ID di mobile */
    }

    /* Modal mobile */
    .modal-content {
        flex-direction: column;
        width: 94%;
        max-height: 90vh;
    }

    .modal-image {
        width: 100%;
        height: 40vh;
    }

    .modal-info-content {
        width: 100%;
        padding: 24px 18px;
    }

    .modal-info-content h2 {
        font-size: 1.6rem;
    }

    .synopsis-text {
        font-size: 0.92rem;
    }

    .modal-btn {
        font-size: 0.98rem;
        padding: 12px 0;
    }

    /* ============================================================
   COMMENT MODAL - Romance ID Project
   Tempel isi file ini ke bagian bawah style.css kamu
   ============================================================ */

}

/* Tombol komentar di card */

/* =============================================
   COMMENT SYSTEM
   ============================================= */

.btn-comment {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  margin-top: 8px;
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-comment:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

.btn-comment i { font-size: 0.85rem; }

@media (max-width: 768px) {
  .btn-comment {
    font-size: 0.55rem !important;
    padding: 4px 0 !important;
    gap: 3px !important;
    margin-top: 4px !important;
    border-width: 1px !important;
    border-radius: 6px !important;
    color: var(--accent) !important;
    background: transparent !important;
  }
  .btn-comment i { font-size: 0.55rem !important; }
}

/* Overlay */
#commentModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
  cursor: pointer;
}

#commentModal.show { display: flex; }

/* Modal box */
.comment-modal-content {
  background: var(--bg-modal);
  border: 1px solid rgba(254,231,21,0.25);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  cursor: default;
}

/* Header */
.comment-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(254,231,21,0.12);
  flex-shrink: 0;
}

.comment-modal-header img {
  width: 38px;
  height: 52px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid rgba(254,231,21,0.2);
}

.comment-modal-header-info {
  flex: 1;
  min-width: 0;
}

.comment-modal-header-info h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px;
}

.comment-modal-header-info span {
  font-size: 0.75rem;
  color: var(--text-gray);
}

.comment-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: var(--text-gray);
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.comment-modal-close:hover {
  background: rgba(254,231,21,0.12);
  border-color: var(--accent);
  color: var(--accent);
}

/* Daftar komentar */
#commentList {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
  max-height: 320px;
}

#commentList::-webkit-scrollbar { width: 3px; }
#commentList::-webkit-scrollbar-track { background: transparent; }
#commentList::-webkit-scrollbar-thumb {
  background: rgba(254,231,21,0.25);
  border-radius: 3px;
}

/* Item komentar */
.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: commentFadeIn 0.2s ease;
}

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

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bg-dark);
  flex-shrink: 0;
}

.comment-body { flex: 1; min-width: 0; }

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 3px;
}

.comment-username {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-white);
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-gray);
}

.comment-text {
  font-size: 0.82rem;
  color: var(--text-gray);
  line-height: 1.55;
  word-break: break-word;
  margin: 0;
}

/* State kosong & loading */
.comment-empty,
.comment-loading {
  text-align: center;
  color: var(--text-gray);
  padding: 28px 0;
  font-size: 0.83rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.comment-empty i {
  font-size: 1.8rem;
  color: var(--accent);
  opacity: 0.35;
}

/* Form */
.comment-modal-form {
  border-top: 1px solid rgba(254,231,21,0.12);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

#commentUsername {
  background: rgba(254,231,21,0.05);
  border: 1px solid rgba(254,231,21,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

#commentUsername::placeholder { color: var(--text-gray); }
#commentUsername:focus { border-color: rgba(254,231,21,0.55); }

.comment-textarea-wrapper { position: relative; }

#commentInput {
  background: rgba(254,231,21,0.05);
  border: 1px solid rgba(254,231,21,0.2);
  border-radius: 8px;
  padding: 10px 12px 26px;
  color: var(--text-white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  resize: none;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
  min-height: 76px;
}

#commentInput::placeholder { color: var(--text-gray); }
#commentInput:focus { border-color: rgba(254,231,21,0.55); }

#commentCharCount {
  position: absolute;
  bottom: 7px;
  right: 10px;
  font-size: 0.68rem;
  color: var(--text-gray);
  pointer-events: none;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#commentError {
  font-size: 0.73rem;
  color: #ff6b6b;
  flex: 1;
}

#commentSendBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: var(--bg-dark);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

#commentSendBtn:hover { opacity: 0.85; }
#commentSendBtn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Responsif mobile */
@media (max-width: 480px) {
  #commentModal {
    align-items: flex-end;
    padding: 0;
  }

  .comment-modal-content {
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 100%;
  }

  #commentList { max-height: 260px; }
}

.comment-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: var(--bg-dark);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 20px;
  line-height: 1;
}

.comment-count-badge:empty { display: none; }

@media (max-width: 768px) {
  .comment-count-badge {
    min-width: 12px;
    height: 12px;
    font-size: 0.45rem;
    padding: 0 3px;
  }
}
