:root {
    --primary: #e91e63;
    --bg-dark: #0f0f13;
    --bg-card: #1e1e24;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --radius: 16px;
}

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

/* --- HEADER --- */
.detail-navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 15px 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.back-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center; justify-content: center;
    color: white; text-decoration: none;
    font-size: 1.2rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.2s;
}
.back-btn:active { transform: scale(0.9); background: var(--primary); }

/* --- HERO SECTION --- */
.detail-hero {
    position: relative;
    width: 100%;
    min-height: 450px;
    padding-top: 80px; /* Space for navbar */
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(15px) brightness(0.3);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeUp 0.8s ease;
}

.poster-wrapper {
    width: 160px;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 3px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}
.poster-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
}

.manga-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.manga-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.meta-badge {
    padding: 6px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 6px;
}
.meta-badge i { color: var(--primary); }

/* --- ACTION BUTTONS --- */
.action-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

.btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    transition: transform 0.2s, filter 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn:active { transform: scale(0.95); }

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    backdrop-filter: blur(10px);
}

/* --- CONTENT AREA --- */
.content-area {
    position: relative;
    z-index: 2;
    padding: 0 20px 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
    color: #eee;
}

.synopsis {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 30px;
    background: var(--bg-card);
    padding: 15px;
    border-radius: var(--radius);
}

/* --- CHAPTER LIST --- */
.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: background 0.2s, transform 0.2s;
    border: 1px solid rgba(255,255,255,0.03);
}

.chapter-item:hover {
    background: #2a2a35;
    transform: translateX(5px);
}
.chapter-item:active { background: var(--primary); color: white; }

.ch-title { font-weight: 500; font-size: 0.9rem; }
.ch-date { font-size: 0.75rem; color: #777; }
.chapter-item:active .ch-date { color: rgba(255,255,255,0.8); }

/* --- ANIMATIONS --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Skeleton */
.skeleton-bg { background: #222; width: 100%; height: 100%; }
.skeleton-text { background: #222; height: 15px; border-radius: 4px; margin-bottom: 8px; }

/* Responsive */
@media (max-width: 480px) {
    .detail-hero { min-height: auto; padding-bottom: 20px; }
    .manga-title { font-size: 1.3rem; }
    .poster-wrapper { width: 140px; }
}
