* {
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===== THEME VARIABLES ===== */
[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent: #ec4899;
    --border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-card-hover: rgba(0, 0, 0, 0.06);
    --text-primary: #1a1a1a;
    --text-secondary: rgba(0, 0, 0, 0.65);
    --accent: #ec4899;
    --border: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(0, 0, 0, 0.05);
}

[data-theme="midnight"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(99, 102, 241, 0.1);
    --bg-card-hover: rgba(99, 102, 241, 0.15);
    --text-primary: #e0e7ff;
    --text-secondary: rgba(224, 231, 255, 0.7);
    --accent: #6366f1;
    --border: rgba(99, 102, 241, 0.2);
    --input-bg: rgba(99, 102, 241, 0.1);
}

[data-theme="crimson"] {
    --bg-primary: #1a0f0f;
    --bg-secondary: #2a1515;
    --bg-card: rgba(220, 38, 38, 0.1);
    --bg-card-hover: rgba(220, 38, 38, 0.15);
    --text-primary: #fef2f2;
    --text-secondary: rgba(254, 242, 242, 0.7);
    --accent: #dc2626;
    --border: rgba(220, 38, 38, 0.2);
    --input-bg: rgba(220, 38, 38, 0.1);
}

[data-theme="forest"] {
    --bg-primary: #0a1a0f;
    --bg-secondary: #152a1a;
    --bg-card: rgba(34, 197, 94, 0.1);
    --bg-card-hover: rgba(34, 197, 94, 0.15);
    --text-primary: #f0fdf4;
    --text-secondary: rgba(240, 253, 244, 0.7);
    --accent: #22c55e;
    --border: rgba(34, 197, 94, 0.2);
    --input-bg: rgba(34, 197, 94, 0.1);
}

[data-theme="sunset"] {
    --bg-primary: #1f0f1a;
    --bg-secondary: #2f1a25;
    --bg-card: rgba(249, 115, 22, 0.1);
    --bg-card-hover: rgba(249, 115, 22, 0.15);
    --text-primary: #fff7ed;
    --text-secondary: rgba(255, 247, 237, 0.7);
    --accent: #f97316;
    --border: rgba(249, 115, 22, 0.2);
    --input-bg: rgba(249, 115, 22, 0.1);
}

[data-theme="dracula"] {
    --bg-primary: #282a36;
    --bg-secondary: #44475a;
    --bg-card: rgba(189, 147, 249, 0.1);
    --bg-card-hover: rgba(189, 147, 249, 0.15);
    --text-primary: #f8f8f2;
    --text-secondary: rgba(248, 248, 242, 0.7);
    --accent: #bd93f9;
    --border: rgba(189, 147, 249, 0.2);
    --input-bg: rgba(189, 147, 249, 0.1);
}

[data-theme="ocean"] {
    --bg-primary: #0a1929;
    --bg-secondary: #0f2540;
    --bg-card: rgba(6, 182, 212, 0.1);
    --bg-card-hover: rgba(6, 182, 212, 0.15);
    --text-primary: #ecfeff;
    --text-secondary: rgba(236, 254, 255, 0.7);
    --accent: #06b6d4;
    --border: rgba(6, 182, 212, 0.2);
    --input-bg: rgba(6, 182, 212, 0.1);
}

[data-theme="rose"] {
    --bg-primary: #fff1f2;
    --bg-secondary: #ffffff;
    --bg-card: rgba(244, 63, 94, 0.08);
    --bg-card-hover: rgba(244, 63, 94, 0.12);
    --text-primary: #1f1012;
    --text-secondary: rgba(31, 16, 18, 0.7);
    --accent: #f43f5e;
    --border: rgba(244, 63, 94, 0.15);
    --input-bg: rgba(244, 63, 94, 0.05);
}

[data-theme="nord"] {
    --bg-primary: #2e3440;
    --bg-secondary: #3b4252;
    --bg-card: rgba(136, 192, 208, 0.1);
    --bg-card-hover: rgba(136, 192, 208, 0.15);
    --text-primary: #eceff4;
    --text-secondary: rgba(236, 239, 244, 0.7);
    --accent: #88c0d0;
    --border: rgba(136, 192, 208, 0.2);
    --input-bg: rgba(136, 192, 208, 0.1);
}

/* ===== COMPONENTS ===== */
.navbar {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-input {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.card-bg {
    background: var(--bg-card);
    color: var(--text-primary);
}

.card-bg-hover:hover {
    background: var(--bg-card-hover);
}

.theme-modal {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ==========================================
   CAROUSEL SLIDE TRANSITIONS
   ========================================== */
.carousel-slide {
    position: absolute;
    inset: 0; /* Top, Right, Bottom, Left = 0 */
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.05); /* Sedikit zoom out saat tidak aktif */
    pointer-events: none;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1); /* Kembali normal saat aktif */
    pointer-events: auto;
    z-index: 10;
}

/* Optional: Animasi halus untuk dots */
.carousel-dot {
    transition: all 0.3s ease;
}

/* ===== MANGA CARD ===== */
.manga-card {
    display: block;
    transition: transform 0.3s ease;
}

.manga-card:hover {
    transform: translateY(-4px);
}

/* ===== GENRE CARD ===== */
.genre-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.genre-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ===== SCROLLABLE CONTENT ===== */
.scrollable-content {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: transparent;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

/* ===== THEME GRID ===== */
.theme-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-card:hover {
    transform: scale(1.05);
}

.theme-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.2);
}

/* ===== STATUS COLORS ===== */
.status-ongoing { background: rgba(34, 197, 94, 0.9); color: white; }
.status-completed { background: rgba(59, 130, 246, 0.9); color: white; }
.status-hiatus { background: rgba(234, 179, 8, 0.9); color: white; }
.status-cancelled { background: rgba(239, 68, 68, 0.9); color: white; }
.status-default { background: rgba(156, 163, 175, 0.9); color: white; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== LINE CLAMP ===== */
.line-clamp-2 {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .carousel-slide img {
        object-position: center 30%;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

/* ===== SYMMETRICAL MANGA CARD ===== */
.manga-card-symmetrical {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.manga-card-symmetrical:hover {
    transform: translateY(-6px);
}

.manga-card-symmetrical .card-image-wrapper {
    position: relative;
    flex-shrink: 0;
    border-radius: 1rem;
}

.manga-card-symmetrical .card-body {
    display: flex;
    flex-direction: column;
    padding-top: 0.875rem;
    min-height: 130px; /* Fixed minimum height for symmetry */
    gap: 0.5rem;
}

.manga-card-symmetrical .card-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em; /* Always occupies 2 lines worth of space */
}

.manga-card-symmetrical .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.7;
    padding: 0 0.125rem;
}

.manga-card-symmetrical .meta-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.manga-card-symmetrical .meta-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

/* ===== STATUS & CHAPTER PILLS (on image) ===== */
/* ===== SYMMETRICAL BADGE BAR ===== */
.card-badges-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.625rem;
    gap: 0.5rem;
    pointer-events: none;
}

/* Unified base style for both badges (ensures perfect symmetry) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    border-radius: 9999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-width: 48%;
    white-space: nowrap;
    pointer-events: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Icon inside badge - fixed size for symmetry */
.badge-icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

.badge-text {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Placeholder maintains symmetry when chapter doesn't exist */
.badge-placeholder {
    width: 0;
    height: 1.5rem;
    visibility: hidden;
}

/* ===== BADGE COLOR VARIANTS ===== */

/* Chapter Badge: Pink-to-purple gradient */
.badge-chapter {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95) 0%, rgba(168, 85, 247, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}
.badge-chapter:hover {
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.5);
}

/* Status Badges - Each status has its own color */
.status-ongoing {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95) 0%, rgba(16, 185, 129, 0.95) 100%);
}
.status-ongoing:hover {
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.5);
}

.status-completed {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(99, 102, 241, 0.95) 100%);
}
.status-completed:hover {
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.5);
}

.status-hiatus {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(249, 115, 22, 0.95) 100%);
}
.status-hiatus:hover {
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.status-cancelled {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
}
.status-cancelled:hover {
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
}

.status-default {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.95) 0%, rgba(75, 85, 99, 0.95) 100%);
}

/* ===== RESPONSIVE BADGE ADJUSTMENTS ===== */
@media (max-width: 640px) {
    .card-badges-bar {
        padding: 0.5rem;
        gap: 0.375rem;
    }
    .badge {
        padding: 0.3rem 0.5rem;
        font-size: 0.625rem;
        gap: 0.25rem;
    }
    .badge-icon {
        width: 0.625rem;
        height: 0.625rem;
    }
}

@media (max-width: 400px) {
    /* On very small cards, hide icons for space */
    .badge-icon {
        display: none;
    }
    .badge {
        padding: 0.25rem 0.5rem;
    }
}

/* ===== GENRE PILLS (THE STAR DESIGN) ===== */
.genre-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: auto; /* Pushes to bottom for symmetry */
    padding-top: 0.25rem;
}

.genre-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.genre-pill:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Pill Color Variants */
.genre-pill-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0.05) 100%);
    color: #ec4899;
    border-color: rgba(236, 72, 153, 0.3);
}
.genre-pill-pink:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(236, 72, 153, 0.15) 100%);
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.3);
}

.genre-pill-purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(168, 85, 247, 0.05) 100%);
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.3);
}
.genre-pill-purple:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(168, 85, 247, 0.15) 100%);
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.3);
}

.genre-pill-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}
.genre-pill-blue:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.genre-pill-green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}
.genre-pill-green:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.15) 100%);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3);
}

.genre-pill-orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.05) 100%);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.3);
}
.genre-pill-orange:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25) 0%, rgba(249, 115, 22, 0.15) 100%);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.3);
}

.genre-pill-default {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Light theme adjustments for pills */
[data-theme="light"] .genre-pill,
[data-theme="rose"] .genre-pill {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
}

[data-theme="light"] .genre-pill-pink,
[data-theme="rose"] .genre-pill-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(236, 72, 153, 0.04) 100%);
    color: #db2777;
}

[data-theme="light"] .genre-pill-purple,
[data-theme="rose"] .genre-pill-purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(168, 85, 247, 0.04) 100%);
    color: #9333ea;
}

[data-theme="light"] .genre-pill-blue,
[data-theme="rose"] .genre-pill-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.04) 100%);
    color: #2563eb;
}

[data-theme="light"] .genre-pill-green,
[data-theme="rose"] .genre-pill-green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.04) 100%);
    color: #16a34a;
}

[data-theme="light"] .genre-pill-orange,
[data-theme="rose"] .genre-pill-orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(249, 115, 22, 0.04) 100%);
    color: #ea580c;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .manga-card-symmetrical .card-body {
        min-height: 115px;
    }
    .genre-pill {
        font-size: 0.625rem;
        padding: 0.2rem 0.5rem;
    }
    .genre-pill span:not(svg) {
        max-width: 60px;
    }
}

/* Staggered entrance animation for cards */
.manga-card-symmetrical {
    animation: cardFadeIn 0.5s ease-out backwards;
}

.manga-card-symmetrical:nth-child(1) { animation-delay: 0.05s; }
.manga-card-symmetrical:nth-child(2) { animation-delay: 0.1s; }
.manga-card-symmetrical:nth-child(3) { animation-delay: 0.15s; }
.manga-card-symmetrical:nth-child(4) { animation-delay: 0.2s; }
.manga-card-symmetrical:nth-child(5) { animation-delay: 0.25s; }
.manga-card-symmetrical:nth-child(6) { animation-delay: 0.3s; }
.manga-card-symmetrical:nth-child(7) { animation-delay: 0.35s; }
.manga-card-symmetrical:nth-child(8) { animation-delay: 0.4s; }
.manga-card-symmetrical:nth-child(9) { animation-delay: 0.45s; }
.manga-card-symmetrical:nth-child(10) { animation-delay: 0.5s; }
.manga-card-symmetrical:nth-child(11) { animation-delay: 0.55s; }
.manga-card-symmetrical:nth-child(12) { animation-delay: 0.6s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== EXPLORE GENRES - PILL DESIGN ===== */

/* Container that limits height until expanded */
.genres-flow-container {
    position: relative;
    max-height: 140px;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.genres-flow-container.expanded {
    max-height: 2000px;
}

/* Fade effect at bottom when collapsed */
.genres-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 90%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.genres-fade.hidden {
    opacity: 0;
    display: none;
}

/* Flowing pill grid */
.genres-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    padding-bottom: 2rem;
}

/* ===== FEATURED GENRE PILLS (Large, gradient) ===== */
.featured-genre-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 9999px;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    isolation: isolate;
}

.featured-genre-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    z-index: -1;
    transition: transform 0.4s ease;
}

.featured-genre-pill:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.featured-genre-pill:hover::before {
    transform: scale(1.1);
}

.featured-genre-pill:active {
    transform: translateY(-1px) scale(1.01);
}

.featured-pill-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.featured-pill-text {
    letter-spacing: 0.01em;
}

.featured-pill-arrow {
    width: 1rem;
    height: 1rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.3s ease;
}

.featured-genre-pill:hover .featured-pill-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Featured pill color variants */
.featured-pill-rose {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4);
}
.featured-pill-rose:hover {
    box-shadow: 0 12px 28px rgba(244, 63, 94, 0.5);
}

.featured-pill-violet {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}
.featured-pill-violet:hover {
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.5);
}

.featured-pill-sky {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}
.featured-pill-sky:hover {
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.5);
}

.featured-pill-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}
.featured-pill-emerald:hover {
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.featured-pill-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}
.featured-pill-amber:hover {
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.5);
}

.featured-pill-fuchsia {
    background: linear-gradient(135deg, #d946ef 0%, #c026d3 100%);
    box-shadow: 0 4px 14px rgba(217, 70, 239, 0.4);
}
.featured-pill-fuchsia:hover {
    box-shadow: 0 12px 28px rgba(217, 70, 239, 0.5);
}

.featured-pill-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}
.featured-pill-cyan:hover {
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.5);
}

.featured-pill-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.featured-pill-indigo:hover {
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5);
}

/* ===== FLOWING GENRE PILLS (Small, elegant) ===== */
.genre-flow-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: pillFloat 0.5s ease-out backwards;
}

.genre-flow-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.genre-flow-pill > * {
    position: relative;
    z-index: 1;
}

.genre-flow-pill:hover {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.genre-flow-pill:hover::before {
    opacity: 1;
}

.genre-flow-pill:hover .flow-pill-text {
    color: white;
}

.flow-pill-icon {
    font-size: 0.95rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.flow-pill-text {
    transition: color 0.3s ease;
}

/* Flow pill color variants (with hover gradient) */
.flow-pill-soft-pink::before {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}
.flow-pill-soft-pink:hover { box-shadow: 0 8px 20px rgba(236, 72, 153, 0.4); }

.flow-pill-soft-purple::before {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}
.flow-pill-soft-purple:hover { box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4); }

.flow-pill-soft-blue::before {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.flow-pill-soft-blue:hover { box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4); }

.flow-pill-soft-green::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.flow-pill-soft-green:hover { box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4); }

.flow-pill-soft-orange::before {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.flow-pill-soft-orange:hover { box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4); }

.flow-pill-soft-cyan::before {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}
.flow-pill-soft-cyan:hover { box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4); }

.flow-pill-soft-yellow::before {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
}
.flow-pill-soft-yellow:hover { box-shadow: 0 8px 20px rgba(234, 179, 8, 0.4); }

.flow-pill-soft-red::before {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.flow-pill-soft-red:hover { box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4); }

/* Floating entrance animation */
@keyframes pillFloat {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Light theme adjustments ===== */
[data-theme="light"] .featured-genre-pill,
[data-theme="rose"] .featured-genre-pill {
    border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .genre-flow-pill,
[data-theme="rose"] .genre-flow-pill {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .genres-fade,
[data-theme="rose"] .genres-fade {
    background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 90%);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .featured-genre-pill {
        padding: 0.75rem 1.125rem;
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    .featured-pill-icon {
        font-size: 1.1rem;
    }
    .genre-flow-pill {
        padding: 0.45rem 0.875rem;
        font-size: 0.75rem;
        gap: 0.375rem;
    }
    .flow-pill-icon {
        font-size: 0.85rem;
    }
    .genres-flow {
        gap: 0.5rem;
    }
    /* .featured-genre-pill + .featured-genre-pill { */
        /* Stagger on mobile for better fit */
    /* } */
}

@media (max-width: 400px) {
    .featured-pill-arrow {
        display: none;
    }
}

/* ===== CAROUSEL ARROWS - RESPONSIVE ===== */

/* Desktop arrows (middle sides) */
.carousel-arrow {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.carousel-arrow:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Show arrows when hovering over carousel section */
section:hover .carousel-arrow {
    opacity: 1;
}

/* Mobile arrows (top corners) */
.carousel-arrow-mobile {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.carousel-arrow-mobile:hover {
    opacity: 1;
    transform: scale(1.1);
}

.carousel-arrow-mobile:active {
    transform: scale(0.95);
}

/* Ensure arrows don't interfere with carousel dots */
.carousel-arrow-mobile {
    margin-top: 0;
}

/* Prevent text selection during swipe */
#heroCarousel {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: pan-y; /* Allow vertical scroll but capture horizontal swipe */
}

/* Smooth transition for carousel content on mobile */
@media (max-width: 768px) {
    .carousel-slide {
        transition: opacity 0.6s ease-in-out;
    }
    
    /* Ensure text content doesn't overlap with top arrows */
    .carousel-slide .relative.z-10 {
        padding-top: 3.5rem; /* Space for mobile arrows */
    }
}

/* Hide arrows on very small screens if content is too cramped */
@media (max-width: 380px) {
    .carousel-arrow-mobile {
        width: 2rem;
        height: 2rem;
    }
    .carousel-arrow-mobile svg {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 768px) {
    .carousel-arrow {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* ===== DONATE BUTTON PULSE ANIMATION ===== */
@keyframes donate-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.6);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(236, 72, 153, 0);
        transform: scale(1.06); /* Efek detak jantung membesar sedikit */
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
        transform: scale(1);
    }
}

.animate-donate {
    animation: donate-pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Hentikan animasi saat di-hover agar tidak bertabrakan dengan efek hover */
.animate-donate:hover {
    animation: none;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}

/* ===== SINKRONISASI SELECT DENGAN TEMA ===== */
#sortSelect {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    
    /* Custom Dropdown Arrow (Chevron) agar cocok dengan Dark/Light Mode */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    
    /* Hapus tampilan default OS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem; /* Ruang untuk icon panah */
    transition: all 0.3s ease;
}

/* Warna background dropdown option saat menu diklik / dibuka */
#sortSelect option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Efek Focus menggunakan warna Accent dari tema yang sedang aktif */
#sortSelect:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--accent);
}