/* ============================================ */
/* FILE: assets/css/style.css - VERSI FINAL */
/* ============================================ */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-color: #ff6b6b;
    --border-color: #dddddd;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-color: #ff8585;
    --border-color: #404040;
    --card-bg: #2d2d2d;
    --header-bg: #2d2d2d;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* ============================================ */
/* HEADER & NAVIGATION */
/* ============================================ */
.header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle,
.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle {
    display: none;
}

/* ============================================ */
/* SEARCH BAR */
/* ============================================ */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.search-btn:hover {
    opacity: 0.9;
}

/* ============================================ */
/* MAIN CONTAINER */
/* ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================ */
/* COLLECTIONS SECTION */
/* ============================================ */
.collections-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.collection-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.collection-card:hover {
    transform: translateY(-5px);
}

.collection-card a {
    text-decoration: none;
    color: var(--text-primary);
}

.collection-poster {
    aspect-ratio: 3/4;
    overflow: hidden;
}

.collection-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-poster {
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.collection-info {
    padding: 0.8rem;
}

.collection-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================ */
/* GENRES SECTION */
/* ============================================ */
.genres-section {
    margin-bottom: 2rem;
}

.genres-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.genre-tag {
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.genre-tag:hover {
    background-color: var(--accent-color);
    color: white;
}

/* ============================================ */
/* POSTS SECTION (EPISODE TERBARU) */
/* ============================================ */
.posts-section {
    margin-bottom: 2rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card a {
    text-decoration: none;
    color: var(--text-primary);
}

.post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.post-info {
    padding: 1rem;
}

.post-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.post-meta i {
    margin-right: 0.3rem;
}

/* ============================================ */
/* POPULAR SECTION */
/* ============================================ */
.popular-section {
    margin-top: 2rem;
}

.popular-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.popular-card:hover {
    transform: translateY(-5px);
}

.popular-card a {
    text-decoration: none;
    color: var(--text-primary);
}

/* ============================================ */
/* ANIME OF THE DAY */
/* ============================================ */
.aotd-section {
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff9a9e 100%);
    padding: 2rem;
    border-radius: 8px;
    color: white;
}

.aotd-section .btn {
    background: white;
    color: var(--accent-color);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s;
}

/* ============================================ */
/* PAGINATION */
/* ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.page-link:hover,
.page-link.active {
    background-color: var(--accent-color);
    color: white;
}

/* ============================================ */
/* DOWNLOAD BUTTONS */
/* ============================================ */
.download-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.download-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(5px);
}

.download-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

/* ============================================ */
/* ADS & FOOTER */
/* ============================================ */
.ad-container {
    background-color: var(--bg-secondary);
    padding: 1rem;
    margin: 1rem auto;
    text-align: center;
    border-radius: 8px;
    max-width: 1200px;
}

.footer {
    background-color: var(--bg-secondary);
    margin-top: 3rem;
    padding: 2rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    color: var(--text-secondary);
}

/* ============================================ */
/* BREADCRUMB NAVIGATION */
/* ============================================ */
.breadcrumb {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-left: 3px solid var(--accent-color);
    box-shadow: var(--shadow);
    width: 100%;
    box-sizing: border-box;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.breadcrumb-item .separator {
    margin-left: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: bold;
}

.breadcrumb-item.active span {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb-schema {
    display: none;
}

/* ============================================ */
/* ANIMASI DROPDOWN */
/* ============================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-menu.active {
    animation: slideDown 0.3s ease;
}

/* ============================================ */
/* DARK MODE SUPPORT */
/* ============================================ */
[data-theme="dark"] .breadcrumb-item a {
    color: #ff9a9e;
}

[data-theme="dark"] .breadcrumb-item.active span {
    color: var(--text-primary);
}

[data-theme="dark"] .download-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* ============================================ */
/* MOBILE RESPONSIVE */
/* ============================================ */
@media (max-width: 768px) {
    /* Header & Navigation */
    .navbar {
        padding: 0.8rem 1rem;
    }
    
    .nav-brand a {
        font-size: 1.3rem;
    }
    
    .menu-toggle {
        display: block !important;
        font-size: 1.5rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--header-bg);
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu ul li a {
        display: block;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Search Bar */
    .search-container {
        margin: 1rem auto;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    /* Collections Grid */
    .collections-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }
    
    .collection-card {
        width: 100%;
    }
    
    .collection-info h3 {
        font-size: 0.9rem;
    }
    
    /* Genres Cloud */
    .genres-cloud {
        gap: 0.5rem;
    }
    
    .genre-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Posts Grid */
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .post-thumbnail {
        width: 100px;
        height: 100px;
        aspect-ratio: 1/1;
        flex-shrink: 0;
    }
    
    .post-info {
        flex: 1;
        padding: 0.5rem;
    }
    
    .post-info h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .post-info p {
        display: none;
    }
    
    .post-meta {
        font-size: 0.75rem;
    }
    
    /* Section Title */
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* Popular Section */
    .popular-section > div {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 0.8rem !important;
    }
    
    /* AOTD */
    .aotd-section {
        padding: 1rem;
    }
    
    .aotd-section h2 {
        font-size: 1.1rem;
    }
    
    .aotd-section p {
        font-size: 0.9rem;
    }
    
    /* Pagination */
    .pagination {
        gap: 0.3rem;
    }
    
    .page-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Breadcrumb Mobile */
    .breadcrumb {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    
    .breadcrumb-list {
        display: inline-flex;
        flex-wrap: nowrap;
        gap: 0.3rem;
    }
    
    .breadcrumb-item {
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .breadcrumb-item .separator {
        margin-left: 0.3rem;
        font-size: 1rem;
    }
    
    .breadcrumb::-webkit-scrollbar {
        display: none;
    }
}

/* ============================================ */
/* SMALL MOBILE (max-width: 480px) */
/* ============================================ */
@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .nav-brand a {
        font-size: 1.2rem;
    }
    
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .popular-section > div {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .breadcrumb {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .breadcrumb-item {
        font-size: 0.75rem;
    }
}