* {
    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;
}
.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: #00d4ff;
    font-size: 32px;
}
.logo h1 {
    font-size: 24px;
    background: linear-gradient(90deg, #00d4ff, #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: #00d4ff;
    color: #0f0f1a;
    border: none;
    padding: 10px 20px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}
/* Page */
.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-1589256469067-ea99122bbdc4?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 #00d4ff;
    display: inline-block;
}
.manhwa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.manhwa-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;
}
.manhwa-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}
.manhwa-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}
.manhwa-info {
    padding: 15px;
}
.manhwa-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.manhwa-info p {
    font-size: 14px;
    color: #aaa;
    display: flex;
    justify-content: space-between;
}
.chapter-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #2a2a3e;
}
.chapter-badge {
    background: #00d4ff;
    color: #0f0f1a;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
.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: #ff4757;
    background: rgba(255, 71, 87, 0.2);
}
.status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}
.status-ongoing { background: #00d4ff; color: #0f0f1a; }
.status-completed { background: #2ed573; color: white; }
.status-hiatus { background: #ffa502; color: white; }
.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: #00d4ff; }
/* A-Z navigation */
.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: #00d4ff;
    color: #0f0f1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.3);
}
/* Genre grid */
.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;
    text-decoration: none;
    color: inherit;
}
.genre-card:hover {
    transform: translateY(-5px);
    border-color: #00d4ff;
}
.genre-card i {
    font-size: 32px;
    margin-bottom: 15px;
    color: #00d4ff;
}
/* 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;
}
.page-btn.active {
    background: #00d4ff;
    color: #0f0f1a;
}
/* Loading */
.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: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* 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);
}
.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #2a2a3e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.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 {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #00d4ff;
    color: #0f0f1a;
    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; }
}
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
    color: #555;
}
/* Responsive */
@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; }
    .manhwa-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; }
    .az-navigation { gap: 6px; padding: 10px; }
    .az-btn { width: 35px; height: 35px; font-size: 14px; }
}
@media (max-width: 480px) {
    .hero { padding: 40px 15px; }
    .hero h2 { font-size: 24px; }
    .manhwa-grid { grid-template-columns: repeat(2, 1fr); }
    .genre-grid { grid-template-columns: repeat(2, 1fr); }
}
