* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #2c3e50;
    --accent-color: #f39c12;
    --background-color: #0f1419;
    --surface-color: #1a1e2e;
    --card-bg: #242b3d;
    --text-color: #ffffff;
    --text-muted: #a0a9c0;
    --border-color: #3d4466;
    --shadow: rgba(0, 0, 0, 0.4);
    --hover-color: #2d3548;
    --primary-hover: #ff5722;
    --gradient-primary: linear-gradient(135deg, #ff6b35, #f39c12);
    --gradient-secondary: linear-gradient(135deg, #667eea, #764ba2);
    --gradient-dark: linear-gradient(135deg, #1a1e2e, #242b3d);
}

[data-theme="light"],
body:not(.dark-theme):not([data-theme="dark"]) {
    --primary-color: #ff6b35;
    --secondary-color: #2c3e50;
    --accent-color: #f39c12;
    --background-color: #f5f7fa;
    --surface-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-muted: #666666;
    --border-color: #e1e8ed;
    --shadow: rgba(0, 0, 0, 0.1);
    --hover-color: #f8f9fa;
    --primary-hover: #ff5722;
    --gradient-primary: linear-gradient(135deg, #ff6b35, #f39c12);
    --gradient-secondary: linear-gradient(135deg, #667eea, #764ba2);
    --gradient-dark: linear-gradient(135deg, #ffffff, #f5f7fa);
}

[data-theme="dark"],
body.dark-theme {
    --primary-color: #ff6b35;
    --secondary-color: #2c3e50;
    --accent-color: #f39c12;
    --background-color: #0f1419;
    --surface-color: #1a1e2e;
    --card-bg: #242b3d;
    --text-color: #ffffff;
    --text-muted: #a0a9c0;
    --border-color: #3d4466;
    --shadow: rgba(0, 0, 0, 0.4);
    --hover-color: #2d3548;
    --primary-hover: #ff5722;
    --gradient-primary: linear-gradient(135deg, #ff6b35, #f39c12);
    --gradient-secondary: linear-gradient(135deg, #667eea, #764ba2);
    --gradient-dark: linear-gradient(135deg, #1a1e2e, #242b3d);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

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

/* Header moderno estilo WuxiaBox */
.header {
    background: var(--card-bg);
    border-bottom: 3px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px var(--shadow);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
    min-height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.nav {
    display: flex;
    gap: 0;
    background: var(--surface-color);
    border-radius: 50px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
}

.nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav a:hover,
.nav a.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav a:hover::before {
    left: 100%;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    display: flex;
    background: var(--surface-color);
    border-radius: 25px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    min-width: 400px;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.95rem;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    padding: 0.8rem 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.search-box button:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.theme-toggle {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* Main Content */
.main {
    min-height: 100vh;
    padding: 2rem 0;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section estilo WuxiaBox */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="40%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23000000" stop-opacity="0.1"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
    opacity: 0.3;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 900;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Cards Grid estilo WuxiaBox */
.novels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.novel-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 2px solid var(--border-color);
    position: relative;
    height: 420px;
}

.novel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.novel-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.2);
    border-color: var(--primary-color);
}

.novel-card:hover::before {
    opacity: 0.05;
}

.novel-cover {
    width: 100%;
    height: 200px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.novel-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
}

.novel-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.novel-info {
    padding: 1.5rem;
    height: 220px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.novel-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.3;
    height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.novel-author {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.novel-genres {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.novel-synopsis {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.novel-source {
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--accent-color);
    background: rgba(243, 156, 18, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

/* Novel Details estilo WuxiaBox */
.novel-details {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    margin: 2rem 0;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.novel-cover-large {
    width: 100%;
    height: 500px;
    background: var(--gradient-secondary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.novel-cover-large::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.1), rgba(243, 156, 18, 0.1));
}

.novel-meta h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 800;
    line-height: 1.2;
}

.novel-meta .author {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.novel-meta .genres {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.novel-meta .status {
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status.completed {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.status.ongoing {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.novel-meta .description {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.favorite-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.favorite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.favorite-btn.favorited {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Chapters List estilo WuxiaBox */
.chapters-list {
    margin-top: 3rem;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid var(--border-color);
}

.chapters-list h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chapters-container {
    max-height: 600px;
    overflow-y: auto;
    margin-top: 1rem;
}

.chapter-item {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.chapter-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.chapter-item:hover {
    background: var(--hover-color);
    border-color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
}

.chapter-item:hover::before {
    transform: scaleY(1);
}

.chapter-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.2rem;
}

.chapter-number {
    background: var(--gradient-primary);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.chapter-info {
    flex: 1;
}

.chapter-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

.chapter-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.chapter-status {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Back Button estilo WuxiaBox */
.back-btn {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    margin-bottom: 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Admin Panel estilo WuxiaBox */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.admin-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.admin-card h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Responsividade melhorada */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .header .container {
        flex-direction: column;
        padding: 1rem 10px;
        gap: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.3rem;
        gap: 0.3rem;
        width: 100%;
    }

    .nav a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        flex: 1;
        text-align: center;
        min-width: 80px;
    }

    .search-box {
        min-width: 100%;
        width: 100%;
    }

    .novels-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }

    .novel-card {
        height: auto;
        min-height: 380px;
    }

    .novel-details {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
        text-align: center;
    }

    .novel-cover-large {
        width: 250px;
        height: 350px;
        margin: 0 auto;
    }

    .hero {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .admin-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .admin-card {
        padding: 1.5rem;
    }
}

/* Advanced Search Panel estilo WuxiaBox */
.advanced-search-panel {
    position: absolute;
    top: 100%;
    right: 0;

/* Seção de Atualizações Melhorada */
.updates-section {
    background: var(--gradient-dark);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Seção de Atualizações */
.updates-header {
    text-align: center;
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.updates-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="40%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23000000" stop-opacity="0.1"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
    opacity: 0.3;
}

.updates-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 900;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.updates-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.update-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.2);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.update-controls-section {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.update-controls-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.control-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.update-check-btn {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.update-check-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.update-check-btn:hover::before {
    left: 100%;
}

.updates-tabs {
    display: flex;
    background: var(--card-bg);
    border-radius: 25px;
    padding: 0.8rem;
    margin-bottom: 2rem;
    border: 2px solid var(--border-color);
    overflow-x: auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-weight: 600;
    white-space: nowrap;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tab-btn:hover {
    background: rgba(255, 107, 53, 0.15);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h3 {
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.count-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

.time-filter select,
.timeline-controls .btn-small {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.timeline-container {
    max-height: 500px;
    overflow-y: auto;
}

.timeline-view {
    position: relative;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-left: 3px solid var(--border-color);
    margin-left: 1rem;
    position: relative;
    background: var(--card-bg);
    border-radius: 0 10px 10px 0;
    margin-bottom: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-color);
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.timeline-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Animações para carregamento */
.loading-updates {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-updates .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cards de novels atualizadas */
.updated-novel-card {
    position: relative;
}

.update-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #4CAF50;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.new-badge {
    background: linear-gradient(135deg, #FF5722, #E64A19);
    animation: pulse 2s infinite;
}

.chapters-badge {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    animation: glow 2s infinite alternate;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0% { box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3); }
    100% { box-shadow: 0 4px 16px rgba(76, 175, 80, 0.6); }
}

/* Responsividade */
@media (max-width: 768px) {
    .update-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .control-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .updates-tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        min-width: 100px;
        font-size: 0.9rem;
    }
}
}

/* Botões de atualização modernos */
.btn-primary, .btn-secondary, .btn-info, .btn-warning {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--gradient-primary);
}

.btn-secondary {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.btn-info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.btn-primary:hover, .btn-secondary:hover, .btn-info:hover, .btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}


    width: 400px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
}

.advanced-search-content {
    padding: 2rem;
}

.advanced-search-content h4 {
    margin: 0 0 1.5rem 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    font-weight: 700;
}

.search-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.search-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--hover-color);
    border-color: var(--text-muted);
}

/* Loading Animation estilo WuxiaBox */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 300px;
    color: var(--text-muted);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Reader estilo WuxiaBox */
.reader-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 2px solid var(--border-color);
}

#chapterContent {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

#chapterContent p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

#chapterContent p.dialogue {
    background: var(--surface-color);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    position: relative;
}

.reader-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    gap: 1rem;
}

.reader-navigation button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reader-navigation button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.reader-navigation button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Status indicators estilo WuxiaBox */
.status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    position: relative;
}

.status-indicator.active {
    background: var(--primary-color);
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.5);
}

.status-indicator.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.status-indicator.error {
    background: #e74c3c;
    box-shadow: 0 0 12px rgba(231, 76, 60, 0.5);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Animações adicionais */
.novel-card,
.admin-card,
.chapter-item {
    animation: slideInUp 0.6s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias de performance */
.novel-card,
.admin-card,
.chapter-item,
.btn-primary,
.btn-secondary,
.search-box,
.nav a {
    will-change: transform;
}

/* API Configuration Section */
.api-config {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.current-url-display {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--surface-color);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.current-url-display small {
    color: var(--text-muted);
    font-family: monospace;
}

.api-url-input label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}