:root {
    --primary: #4a00e0;
    --secondary: #8e2de2;
    --accent: #ff6b6b;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #28a745;
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #2d2d2d;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
    color: var(--accent);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

nav ul li a:hover {
    color: var(--accent);
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 5px 15px;
    margin: 0 15px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    padding: 5px;
    width: 200px;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.user-actions a {
    margin-left: 15px;
    font-size: 1.2rem;
}

/* Main Content */
.hero {
    background: url('https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1600&q=80') no-repeat center center/cover;
    height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
}

.hero-content {
    position: relative;
    max-width: 600px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--accent);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Mangas Section */
.section-title {
    text-align: center;
    margin: 40px 0 30px;
    font-size: 2.2rem;
    color: var(--dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.manga-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.manga-card:hover {
    transform: translateY(-10px);
}

.manga-cover {
    height: 280px;
    overflow: hidden;
}

.manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.manga-card:hover .manga-cover img {
    transform: scale(1.1);
}

.manga-info {
    padding: 15px;
}

.manga-info h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manga-info .chapter {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.manga-info .rating {
    color: #ffc107;
}

.genre-tag {
    display: inline-block;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-right: 5px;
    margin-top: 8px;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: var(--gray);
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--accent);
    background: #ffecec;
    border-radius: 10px;
    margin: 20px 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 10px;
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.manga-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .manga-detail {
        flex-direction: row;
    }
}

.manga-detail-cover {
    flex: 0 0 300px;
}

.manga-detail-cover img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.manga-detail-info {
    flex: 1;
}

.manga-detail-info h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.manga-detail-info .author {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 15px;
}

.manga-detail-info .description {
    margin-bottom: 20px;
    line-height: 1.8;
}

.manga-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat {
    background: var(--light);
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
}

.stat .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat .label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    nav ul {
        margin: 15px 0;
    }
    
    .search-bar {
        margin: 15px 0;
        width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .manga-cover {
        height: 220px;
    }
    
    .manga-stats {
        flex-wrap: wrap;
    }
}

.form-container,
.profile-section,
.sidebar-widget,
.filters-container {
    background: var(--bg-secondary);
    box-shadow: var(--card-shadow);
}

input, select, textarea {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 10px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Ajustes específicos para modo escuro */
[data-theme="dark"] .search-bar {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero::before {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
}

[data-theme="dark"] .manga-info .chapter {
    color: var(--text-secondary);
}

[data-theme="dark"] .genre-tag {
    background: var(--primary);
}

[data-theme="dark"] .footer-section h3::after {
    background: var(--accent);
}

[data-theme="dark"] .social-links a {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .social-links a:hover {
    background: var(--accent);
}

[data-theme="dark"] .no-results i {
    color: #2d2d2d;
}

[data-theme="dark"] .alert-error {
    background: #2d1e1e;
    color: #ff6b6b;
    border: 1px solid #5c3a3a;
}

[data-theme="dark"] .alert-success {
    background: #1e2d1e;
    color: #6bff6b;
    border: 1px solid #3a5c3a;
}

/* Footer Styles */
footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 0;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-logo i {
    margin-right: 10px;
    color: var(--accent);
}

.footer-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: white;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer-links li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-bottom-links a:hover {
    color: var(--accent);
}

/* Responsividade do Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
}

/* Ajustes para modo escuro nos cards de mangá */
[data-theme="dark"] .manga-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .manga-info {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .manga-info h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .manga-info .chapter {
    color: var(--text-secondary);
}

[data-theme="dark"] .manga-info .rating {
    color: #ffc107;
}

[data-theme="dark"] .genre-tag {
    background: var(--primary);
    color: white;
}

/* Ajustes para o modal no modo escuro */
[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .manga-detail-info h2 {
    color: var(--text-primary);
}

[data-theme="dark"] .manga-detail-info .author {
    color: var(--text-secondary);
}

[data-theme="dark"] .manga-detail-info .description {
    color: var(--text-primary);
}

[data-theme="dark"] .stat {
    background: var(--bg-primary);
}

[data-theme="dark"] .stat .value {
    color: var(--primary);
}

[data-theme="dark"] .stat .label {
    color: var(--text-secondary);
}

/* Ajustes para os filtros no modo escuro */
[data-theme="dark"] .filters-container {
    background: var(--bg-secondary);
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .filter-group select,
[data-theme="dark"] .search-input {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .search-results {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .search-results h2 {
    color: var(--text-primary);
}

/* Ajustes para a lista de capítulos no modo escuro */
[data-theme="dark"] .chapters-list {
    background: var(--bg-secondary);
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .chapter-card {
    background: var(--bg-primary);
}

[data-theme="dark"] .chapter-card a {
    color: var(--primary);
}

[data-theme="dark"] .chapter-date {
    color: var(--text-secondary);
}

/* Ajustes para botões no modo escuro */
[data-theme="dark"] .btn {
    background: var(--primary);
    color: white;
}

[data-theme="dark"] .btn:hover {
    background: var(--secondary);
}

/* Status dos mangás no modo escuro */
[data-theme="dark"] .manga-status.ongoing {
    background: var(--success);
    color: white;
}

[data-theme="dark"] .manga-status.completed {
    background: var(--primary);
    color: white;
}

/* Notificações no modo escuro */
[data-theme="dark"] .notification {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


/* Botão de favoritos */
.btn-favorite {
    background: var(--gray) !important;
    transition: all 0.3s ease;
}

.btn-favorite:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-favorite.favorited {
    background: #dc3545 !important;
}

[data-theme="dark"] .btn-favorite {
    background: var(--gray) !important;
}

[data-theme="dark"] .btn-favorite.favorited {
    background: #dc3545 !important;
}