* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f0f1a;
    color: #f0f0f0;
    min-height: 100vh;
    padding-bottom: 80px; /* Untuk footer navigasi */
}

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

/* Header */
header {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
}

.logo i {
    color: #e50914;
    font-size: 32px;
}

.logo h1 {
    font-size: 24px;
    background: linear-gradient(90deg, #e50914, #ff7b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-bar {
    display: flex;
    max-width: 400px;
    flex-grow: 1;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    background-color: #2a2a3e;
    color: #f0f0f0;
    font-size: 16px;
}

.search-bar button {
    background-color: #e50914;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-size: 16px;
}

/* Main Content */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero {
    background: linear-gradient(rgba(10, 10, 20, 0.8), rgba(10, 10, 20, 0.9)), 
                url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #ffffff;
}

.hero p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 25px;
    color: #cccccc;
    line-height: 1.6;
}

.section-title {
    font-size: 24px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e50914;
    display: inline-block;
}

/* Anime Grid */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.anime-card {
    background-color: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

.anime-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.3);
}

.anime-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.anime-info {
    padding: 15px;
}

.anime-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-info p {
    font-size: 14px;
    color: #aaa;
    display: flex;
    justify-content: space-between;
}

/* Tombol Favorit */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn.active {
    color: #e50914;
    background: rgba(229, 9, 20, 0.2);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a2e;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
    flex: 1;
    padding: 5px 0;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active {
    color: #e50914;
}

.nav-item:hover {
    color: #f0f0f0;
}

/* Page-specific styles */
#animelist-page .hero {
    background: linear-gradient(rgba(26, 26, 46, 0.9), rgba(26, 26, 46, 0.95)), 
                url('https://images.unsplash.com/photo-1518709268805-4e9042af2176?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

#genre-page .hero {
    background: linear-gradient(rgba(26, 26, 46, 0.9), rgba(26, 26, 46, 0.95)), 
                url('https://images.unsplash.com/photo-1511984804822-e16ba72fcf0e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

#favorites-page .hero {
    background: linear-gradient(rgba(26, 26, 46, 0.9), rgba(26, 26, 46, 0.95)), 
                url('https://images.unsplash.com/photo-1542204165-65bf26472b9b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

/* Grid Genre */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0 40px;
}

.genre-card {
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    border-radius: 10px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.genre-card:hover {
    transform: translateY(-5px);
    border-color: #e50914;
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.2);
}

.genre-card i {
    font-size: 32px;
    margin-bottom: 15px;
    color: #e50914;
}

.genre-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.genre-card p {
    font-size: 14px;
    color: #aaa;
}

/* Page genre anime */
.genre-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e50914;
}

.genre-header i {
    font-size: 32px;
    color: #e50914;
}

.back-button {
    background: #2a2a3e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    transition: background 0.3s;
}

.back-button:hover {
    background: #3a3a4e;
}

/* Anime List Page */
.alphabet-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 30px;
    padding: 15px;
    background: #1a1a2e;
    border-radius: 10px;
}

.alphabet-btn {
    background: #2a2a3e;
    color: #aaa;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alphabet-btn:hover {
    background: #3a3a4e;
    color: #fff;
}

.alphabet-btn.active {
    background: #e50914;
    color: white;
}

.all-anime-btn {
    background: #2a2a3e;
    color: #aaa;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.all-anime-btn:hover {
    background: #3a3a4e;
    color: #fff;
}

.all-anime-btn.active {
    background: #e50914;
    color: white;
}

.anime-list-section {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.anime-letter-section {
    margin-bottom: 30px;
}

.anime-letter-section h3 {
    font-size: 22px;
    color: #e50914;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a3e;
}

.empty-favorites, .empty-anime-list {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.empty-favorites i, .empty-anime-list i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
    color: #555;
}

/* ===== TAMBAHAN STYLE DARI PERCOBAAN.HTML ===== */

/* A-Z Navigation - Improved Design */
.az-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
    background: rgba(34, 34, 34, 0.7);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.az-btn {
    padding: 8px 12px;
    background: #333;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.az-btn.active {
    background: #e50914;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(229, 9, 20, 0.3);
}

.az-btn:hover:not(.active) {
    background: #444;
    transform: translateY(-1px);
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    padding: 20px;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #e50914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 15px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.page-btn.active {
    background: #e50914;
    font-weight: bold;
}

.page-btn:hover:not(.active) {
    background: #444;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Anime Badge */
.anime-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e50914;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-top: 1px solid #2a2a3e;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #2a2a3e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}

.search-result-item:hover {
    background: #2a2a3e;
}

.search-result-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.search-result-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.search-result-info p {
    font-size: 12px;
    color: #aaa;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #e50914;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        max-width: 100%;
        width: 100%;
        order: 3;
        margin: 10px 0 0;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .alphabet-filter {
        gap: 6px;
        padding: 10px;
    }
    
    .alphabet-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .anime-card img {
        height: 220px;
    }
    
    .bottom-nav span {
        font-size: 11px;
    }
    
    .nav-item i {
        font-size: 18px;
    }
    
    .az-navigation {
        gap: 6px;
    }
    
    .az-btn {
        padding: 6px 10px;
        min-width: 30px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 15px;
    }
    
    .hero h2 {
        font-size: 24px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .genre-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .alphabet-filter {
        gap: 4px;
    }
    
    .alphabet-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .bottom-nav span {
        font-size: 10px;
    }
    
    .nav-item {
        padding: 3px 0;
    }
    
    .az-navigation {
        gap: 4px;
        padding: 8px;
    }
    
    .az-btn {
        padding: 5px 8px;
        min-width: 26px;
        font-size: 0.8rem;
    }
    
    .anime-card img {
        height: 200px;
    }
}