﻿@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Teko:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

/* ====== VARIÁVEIS CSS ====== */
:root {
    /* Cores Temáticas */
    --gojo-blue: #00ffff;
    --gojo-purple: #bd00ff;
    --sukuna-red: #ff003c;
    --text-color: #f0f0f0;
    --text-secondary: #aaa;
    --bg-dark: #050505;
    --card-bg: #121212;
    --card-border: #333;
    --bg-hover: #1a1a1a;
    
    /* Efeitos Glow */
    --cursed-energy-glow: 0 0 15px rgba(0, 255, 255, 0.5);
    --sukuna-glow: 0 0 15px rgba(255, 0, 60, 0.5);
    --strong-glow: 0 0 30px;
    
    /* Transições */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Espaçamento */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
    
    /* Tamanhos de Fonte */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.9rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.3rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3.5rem;
}

/* Modo Claro - Sobrescreve variáveis */
html.light-theme {
    --gojo-blue: #0066ff;
    --gojo-purple: #7722dd;
    --sukuna-red: #ff0033;
    --text-color: #111;
    --text-secondary: #333;
    --bg-dark: #ffffff;
    --card-bg: #f9f9f9;
    --card-border: #e0e0e0;
    --bg-hover: #f0f0f0;
    
    /* Efeitos Glow - adaptados para modo claro */
    --cursed-energy-glow: 0 0 20px rgba(0, 102, 255, 0.4);
    --sukuna-glow: 0 0 20px rgba(255, 0, 51, 0.4);
    --strong-glow: 0 0 30px;
}

/* ====== RESET E BASE ====== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(0,0,0,0.9), rgba(0,0,0,0.95)), 
                      url("https://www.transparenttextures.com/patterns/stardust.png");
    color: var(--text-color);
    font-family: "Quicksand", sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

html.light-theme body {
    background-color: #f8f9fa;
    background-image: linear-gradient(rgba(255,255,255,0.95), rgba(248,249,250,0.98)), 
                      url("https://www.transparenttextures.com/patterns/light-wool.png");
}

/* ====== HEADER ====== */
header {
    padding: clamp(0.8rem, 2vw, 1rem) clamp(0.8rem, 3vw, 1.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 3px solid var(--sukuna-red);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

html.light-theme header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid #ff0033;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1rem);
    flex: 0 0 auto;
}

.logo {
    height: clamp(40px, 10vw, 60px);
    filter: invert(1) drop-shadow(0 0 8px var(--gojo-blue));
    transition: transform var(--transition-normal);
    will-change: transform;
}

.logo:hover {
    transform: scale(1.05) rotate(-2deg);
    filter: invert(1) drop-shadow(0 0 15px var(--gojo-blue));
}

header h1 {
    font-family: 'Teko', sans-serif;
    font-size: clamp(1.2rem, 6vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.8vw, 2px);
    background: linear-gradient(45deg, var(--text-color), var(--gojo-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: fit-content;
}

/* ====== SEARCHBOX ====== */
.header-controls {
    display: flex;
    gap: var(--spacing-md);
    flex: 1 1 100%;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    flex: 1;
    min-width: 200px;
}

.search-box input {
    flex: 1;
    min-width: 150px;
    padding: clamp(0.6rem, 2vw, 0.8rem) clamp(0.8rem, 2vw, 1.2rem);
    border-radius: 0;
    border: 2px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
    font-family: 'Roboto Mono', monospace;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-color);
    transition: var(--transition-normal);
}

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

.search-box input:focus {
    outline: none;
    border-color: var(--gojo-blue);
    box-shadow: 0 0 15px var(--gojo-blue), inset 0 0 10px rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

html.light-theme .search-box input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 102, 255, 0.2);
}

html.light-theme .search-box input:focus {
    background: rgba(0, 102, 255, 0.1);
}

#botao-busca {
    padding: clamp(0.5rem, 1vw, 0.7rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: 0;
    border: none;
    cursor: pointer;
    font-family: 'Teko', sans-serif;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    font-weight: 700;
    text-transform: uppercase;
    background: var(--sukuna-red);
    color: #ffffff;
    letter-spacing: 1px;
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
    transition: var(--transition-normal);
    white-space: nowrap;
}

#botao-busca:hover {
    background: #ff1f5a;
    box-shadow: 0 0 20px var(--sukuna-red);
    transform: scale(1.05);
}

#botao-busca:active {
    transform: scale(0.98);
}

main {
    max-width: 1600px; /* Limita a largura para não estourar em monitores 4k */
    margin: clamp(2rem, 6vw, 4rem) auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
    padding-bottom: clamp(3rem, 6vw, 5rem);
    min-height: 80vh;
}

.card-container {
    display: grid;
    /* Otimização do Grid: cria colunas de no mínimo 280px e no máximo 1fr */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem; /* Espaçamento mais consistente no PC */
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(30,20,50,0.3) 100%);
    border-radius: 16px; /* Bordas mais arredondadas */
    border: 1px solid rgba(0, 255, 255, 0.05);
    backdrop-filter: blur(5px); /* Efeito moderno de vidro */
}

/* ====== CARDS ESTILO JUJUTSU ====== */
article.card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: all var(--transition-smooth);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(0,255,255,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Garante distribuição vertical */
    height: 100%; /* Força altura total da célula do grid */
}

article.card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--gojo-blue);
    box-shadow: 0 25px 60px rgba(0, 255, 255, 0.5), 
                inset 0 0 20px rgba(0, 255, 255, 0.15),
                0 0 40px rgba(0, 255, 255, 0.3);
}

article.card:hover h2 {
    color: var(--gojo-blue);
    text-shadow: 0 0 10px var(--gojo-blue);
}

/* ====== CARD IMAGE ====== */
.card-cover {
    width: 100%;
    height: clamp(150px, 30vh, 200px);
    object-fit: cover;
    object-position: center top;
    border-bottom: 5px solid var(--sukuna-red);
    filter: grayscale(40%) contrast(110%);
    transition: filter var(--transition-normal);
    display: block;
}

article.card:hover .card-cover {
    filter: grayscale(0%) contrast(120%);
}

/* ====== CARD CONTENT ====== */
.card-content {
    padding: clamp(0.9rem, 2.5vw, 1.3rem);
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.2) 100%);
}

/* Responsividade da imagem */
@media (max-width: 767px) {
    .card-cover {
        height: clamp(120px, 25vh, 180px);
        object-position: center top;
    }
}

@media (max-width: 599px) {
    .card-cover {
        height: clamp(180px, 35vw, 220px);
        object-position: center top;
    }
}

article h2 {
    font-family: 'Teko', sans-serif;
    font-size: clamp(1.55rem, 2.5vw, 1.8rem);

     /* Levemente ajustado */
    line-height: 1.1; /* Aumentado de 0.9 para evitar sobreposição de acentos na fonte Teko */
    text-transform: uppercase;
    color: var(--text-color);
    transition: var(--transition-normal);
    margin-bottom: clamp(0.2rem, 0.1vw, 0.8rem);
    
    /* MÁGICA DO ALINHAMENTO: */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita o nome a no máximo 2 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; /* Adiciona "..." se passar do limite */
    min-height: 2.2em; /* Reserva espaço para 2 linhas sempre, mantendo os cards alinhados */
    letter-spacing: 0.5px;
}

article p {
    font-size: clamp(0.85rem, 1.3vw, 0.95rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: clamp(0.2rem, 0.8vw, 0.5rem);
    
    /* Limita a descrição para garantir altura uniforme */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Máximo de 3 linhas de descrição */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

article p strong {
    color: var(--sukuna-red);
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
}

/* ====== TAGS ====== */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.4rem, 2.5vw, 0.7rem);
    margin-top: auto;
    border-top: 2px solid rgba(0, 255, 255, 0.2);
    padding-top: clamp(0.8rem, 3vw, 1.2rem);
}

.tag {
    font-size: clamp(0.65rem, 1.8vw, 0.8rem);
    text-transform: uppercase;
    padding: clamp(0.3rem, 1.2vw, 0.5rem) clamp(0.5rem, 2vw, 0.9rem);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 200, 255, 0.05) 100%);
    color: var(--gojo-blue);
    border: 1.5px solid var(--gojo-blue);
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 0.6px;
    transition: var(--transition-fast);
    cursor: default;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 3px;
}

.tag:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 200, 255, 0.2) 100%);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

/* ====== LINK BOTÃO ====== */
article a {
    display: block;
    margin-top: auto;
    margin-top: 1rem;
    text-align: center;
    background: transparent;
    border: 2px solid var(--sukuna-red);
    color: var(--sukuna-red);
    padding: clamp(0.6rem, 2.5vw, 0.9rem);
    text-decoration: none;
    font-family: 'Teko', sans-serif;
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    text-transform: uppercase;
    transition: var(--transition-normal);
    letter-spacing: 1.5px;
    border-radius: 3px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

article a:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--sukuna-red);
    transition: left var(--transition-normal);
    z-index: -1;
}

article a:hover {
    background: var(--sukuna-red);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(255, 0, 60, 0.4);

    box-shadow: 0 0 15px var(--sukuna-red);
}

article a:active {
    transform: scale(0.98);
}

/* ====== HEADER BUTTONS ====== */
.header-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.theme-toggle,
.favorites-btn {
    padding: 0.6rem 0.8rem;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--gojo-blue);
    color: var(--gojo-blue);
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 0;
    transition: var(--transition-fast);
}

.theme-toggle:hover,
.favorites-btn:hover {
    background: var(--gojo-blue);
    color: var(--bg-dark);
    transform: scale(1.05);
}

/* Favorites count badge */
.favorites-btn[data-count]::after {
    content: attr(data-count);
    margin-left: 0.4rem;
    font-size: 0.85em;
    font-weight: 600;
}

/* ====== FILTROS AVANÇADOS ====== */
.filters-section {
    margin: var(--spacing-lg) auto;
    max-width: 0px;
    padding: 0;
    background: linear-gradient(135deg, 
        rgba(18, 18, 18, 0.95) 0%, 
        rgba(30, 20, 50, 0.95) 50%,
        rgba(18, 18, 18, 0.95) 100%);
    border: 2px solid var(--gojo-blue);
    border-radius: 12px;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        0 8px 32px rgba(0, 255, 255, 0.15),
        inset 0 1px 0 rgba(0, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 0, 60, 0.1);
    overflow: hidden;
    animation: filterGlow 3s ease-in-out infinite;
}

@keyframes filterGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), 0 8px 32px rgba(0, 255, 255, 0.15), inset 0 1px 0 rgba(0, 255, 255, 0.2), inset 0 -1px 0 rgba(255, 0, 60, 0.1); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 255, 0.4), 0 12px 40px rgba(0, 255, 255, 0.2), inset 0 1px 0 rgba(0, 255, 255, 0.3), inset 0 -1px 0 rgba(255, 0, 60, 0.15); }
}

/* Light Theme Cards */
html.light-theme .card-container {
    background: linear-gradient(135deg, rgba(240, 250, 255, 0.4) 0%, rgba(245, 245, 255, 0.3) 100%);
    border: 1px solid rgba(0, 102, 255, 0.15);
}

html.light-theme article.card {
    border: 2px solid rgba(0, 102, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.08), inset 0 1px 0 rgba(0, 102, 255, 0.05);
}

html.light-theme article.card:hover {
    border-color: #0066ff;
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.15), 
                inset 0 0 15px rgba(0, 102, 255, 0.08),
                0 0 30px rgba(0, 102, 255, 0.2);
}

html.light-theme .card-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(0, 102, 255, 0.02) 100%);
}

html.light-theme .tag {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, rgba(0, 150, 200, 0.04) 100%);
    border-color: #0066ff;
}

html.light-theme .tag:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.2) 0%, rgba(0, 150, 200, 0.15) 100%);
    color: #0066ff;
    box-shadow: 0 0 8px rgba(0, 102, 255, 0.3);
}

html.light-theme .filters-section {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(240, 250, 255, 0.95) 50%,
        rgba(255, 255, 255, 0.95) 100%);
    border-color: #0066ff;
    box-shadow: 
        0 0 30px rgba(0, 102, 255, 0.25),
        0 8px 32px rgba(0, 102, 255, 0.12),
        inset 0 1px 0 rgba(0, 102, 255, 0.15),
        inset 0 -1px 0 rgba(255, 0, 51, 0.08);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-lg);
    border-bottom: 2px solid rgba(0, 255, 255, 0.4);
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.08) 0%, rgba(255, 0, 60, 0.03) 100%);
}

.filters-header h3 {
    font-family: 'Teko', sans-serif;
    font-size: clamp(1.4rem, 5vw, 2rem);
    text-transform: uppercase;
    margin: 0;
    color: var(--gojo-blue);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.btn-toggle-filters {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.15) 100%);
    border: 2px solid var(--gojo-blue);
    color: var(--gojo-blue);
    padding: 0.6rem 1rem;
    font-family: 'Teko', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

.btn-toggle-filters:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.4) 0%, rgba(0, 200, 255, 0.3) 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.4);
}

.filters-content {
    padding: var(--spacing-xl) var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    background: rgba(0, 0, 0, 0.4);
}

html.light-theme .filters-content {
    background: rgba(240, 250, 255, 0.5);
}

html.light-theme .filters-header {
    background: linear-gradient(90deg, rgba(0, 102, 255, 0.06) 0%, rgba(255, 0, 51, 0.02) 100%);
    border-bottom-color: rgba(0, 102, 255, 0.3);
}

html.light-theme .btn-toggle-filters {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.15) 0%, rgba(0, 200, 255, 0.1) 100%);
    border-color: #0066ff;
    color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}

html.light-theme .btn-toggle-filters:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.3) 0%, rgba(0, 200, 255, 0.25) 100%);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.25);
    color: #0066ff;
}

.filter-group h4 {
    font-family: 'Teko', sans-serif;
    color: var(--gojo-blue);
    font-size: clamp(1.15rem, 3.5vw, 1.4rem);
    text-transform: uppercase;
    margin: 0 0 var(--spacing-md) 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: 1.5px;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: var(--spacing-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    transition: all var(--transition-normal);
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    user-select: none;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, rgba(0, 200, 255, 0.03) 100%);
    font-weight: 500;
}

.checkbox-input {
    cursor: pointer;
    width: 24px;
    height: 24px;
    accent-color: var(--gojo-blue);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.checkbox-input:checked {
    transform: scale(1.2);
}

.checkbox-label:hover {
    color: var(--gojo-blue);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.15) 100%);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateX(8px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

html.light-theme .checkbox-label {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, rgba(0, 200, 255, 0.05) 100%);
}

html.light-theme .checkbox-label:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.2) 0%, rgba(0, 200, 255, 0.15) 100%);
    border-color: rgba(0, 102, 255, 0.6);
}

.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid rgba(0, 255, 255, 0.2);
}

.btn-apply-filters,
.btn-clear-filters {
    padding: 0.7rem 1.5rem;
    font-family: 'Teko', sans-serif;
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-apply-filters {
    background: linear-gradient(135deg, var(--gojo-blue) 0%, #00ccff 100%);
    color: #000;
    border: 2px solid var(--gojo-blue);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.btn-apply-filters:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    border-color: #00ccff;
}

.btn-clear-filters {
    background: linear-gradient(135deg, rgba(255, 0, 51, 0.2) 0%, rgba(200, 0, 40, 0.15) 100%);
    border: 2px solid var(--sukuna-red);
    color: var(--sukuna-red);
    box-shadow: 0 0 20px rgba(255, 0, 51, 0.2);
}

.btn-clear-filters:hover {
    background: linear-gradient(135deg, rgba(255, 0, 51, 0.4) 0%, rgba(200, 0, 40, 0.3) 100%);
    box-shadow: 0 0 30px rgba(255, 0, 51, 0.4);
    transform: translateY(-3px);
}

html.light-theme .btn-apply-filters {
    color: var(--sukuna-red);
}

html.light-theme .btn-clear-filters {
    color: #ff0033;
}

/* ====== CARD HEADER COM FAVORITAR ====== */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.btn-favoritar {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-favoritar:hover {
    transform: scale(1.2);
}

.btn-favoritar.favorited {
    color: var(--sukuna-red);
}

/* ====== PAGINAÇÃO ======= */
.pagination-info {
    text-align: center;
    padding: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 1400px;
    margin: 0 auto;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    max-width: 1400px;
    margin: var(--spacing-lg) auto;
    padding: var(--spacing-md);
    flex-wrap: wrap;
}

.btn-pagination {
    padding: 0.6rem 1rem;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--gojo-blue);
    color: var(--gojo-blue);
    font-family: 'Teko', sans-serif;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-pagination:hover:not(:disabled) {
    background: var(--gojo-blue);
    color: var(--bg-dark);
}

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

.pagination-numbers {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-page {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--card-border);
    color: var(--text-secondary);
    font-family: 'Teko', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: 0;
}

.btn-page:hover {
    border-color: var(--gojo-blue);
    color: var(--gojo-blue);
}

.btn-page.active {
    background: var(--gojo-blue);
    border-color: var(--gojo-blue);
    color: var(--bg-dark);
    font-weight: 700;
}

/* ====== LOADER ====== */
.loader-container {
    display: none;
    justify-content: center;
    align-items: center;
    padding: clamp(2rem, 10vw, 5rem);
    min-height: 400px;
}

.loader {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--gojo-blue), transparent);
    box-shadow: 0 0 25px var(--gojo-blue), 0 0 50px var(--gojo-purple);
    animation: pulseCurse 1s infinite alternate;
}

@keyframes pulseCurse {
    from {
        transform: scale(1);
        opacity: 0.8;
    }
    to {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 40px var(--gojo-blue), 0 0 80px var(--gojo-purple);
    }
}

/* ====== MENSAGEM DE ERRO ====== */
#msg-erro {
    text-align: center;
    padding: clamp(2rem, 5vw, 4rem);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#msg-erro h2 {
    font-family: 'Teko', sans-serif;
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    color: #888;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

/* ====== FOOTER ====== */
.footer {
    border-top: 1px solid #1a1a1a;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 1.5rem);
    text-align: center;
    margin-top: clamp(2rem, 5vw, 4rem);
}

.footer p {
    color: #555;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    font-family: 'Quicksand', sans-serif;
}

/* ====== RESPONSIVIDADE ====== */

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
    .card-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.4rem;
    }
}

/* Large Screens (1024px - 1399px) */
@media (max-width: 1399px) and (min-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
    }
    
    header {
        padding: 1rem 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .search-box {
        flex-basis: 100%;
        order: 3;
    }
    
    header h1 {
        font-size: 2rem;
        flex-basis: 100%;
        order: 1;
    }
    
    .logo-container {
        order: 2;
    }
    
    .card-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    article.card:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

/* Small Tablets (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    header {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }
    
    .logo-container {
        justify-content: center;
    }
    
    .search-box {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .search-box input,
    #botao-busca {
        width: 100%;
    }
    
    header h1 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .card-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    article.card {
        display: grid;
        grid-template-columns: 150px 1fr;
    }
    
    .card-cover {
        height: 200px; /* Increased height for better visibility */
        border-right: 5px solid var(--sukuna-red);
        border-bottom: none;
        object-fit: cover; /* Ensures the image covers the area without distortion */
        width: 100%; /* Makes the image responsive */
    }
    
    .card-content {
        padding: 1rem;
        display: flex;
        flex-direction: column; /* Stacks content vertically */
        justify-content: space-between; /* Distributes space between elements */
    }
    
    article h2 {
        font-size: 2rem;
        padding: 0.1rem;
        margin-top: 1.5rem;
    }
    
    article p {
        font-size: 0.85rem;
    }
}

/* Mobile Phones (up to 599px) */
@media (max-width: 599px) {
    html {
        font-size: 14px;
    }
    
    header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem;
        border-bottom: 2px solid var(--sukuna-red);
    }
    
    .header-controls {
        width: 100%;
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .search-box {
        width: 100%;
        flex-direction: column;
    }
    
    .header-buttons {
        width: 100%;
        justify-content: space-around;
    }
    
    .logo {
        height: 40px;
    }
    
    .logo-container {
        justify-content: center;
        width: 100%;
    }
    
    header h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
        text-align: center;
    }
    
    .search-box input {
        padding: 0.6rem;
        font-size: 1rem;
        width: 100%;
    }
    
    #botao-busca {
        padding: 0.6rem 1rem;
        font-size: 1rem;
        clip-path: polygon(5% 0, 100% 0, 100% 95%, 95% 100%, 0 100%, 0 5%);
    }
    
    .filters-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    main {
        padding: 0 0.5rem;
        margin: 1rem 0;
    }
    
    .card-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    article.card {
        display: flex;
        flex-direction: column;
    }
    
    .card-cover {
        height: 250px; /* Increased height for better visibility */
        border-bottom: 4px solid var(--sukuna-red);
        object-fit: cover; /* Ensures the image covers the area without distortion */
        width: 100%; /* Makes the image responsive */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Added shadow for depth */
    }
    .card-content {
        padding: 1rem;
    }
    
    article h2 {
        font-size: 3rem;
        padding: 0.6rem;
        margin-top: 1rem;
    }
    
    article p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    
    article a {
        font-size: 1rem;
        padding: 0.6rem;
        margin-top: 1rem;
    }
    
    #msg-erro h2 {
        font-size: 1.3rem;
    }
    
    .footer p {
        font-size: 0.75rem;
    }
}

/* Ultra Small Devices (up to 399px) */
@media (max-width: 399px) {
    html {
        font-size: 13px;
    }
    
    .logo {
        height: 45px;
    }
    
    header h1 {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }

    .card-cover {
        height: 250px; /* Increased height for better visibility */
        border-bottom: 4px solid var(--sukuna-red);
        object-fit: cover; /* Ensures the image covers the area without distortion */
        width: 100%; /* Makes the image responsive */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Added shadow for depth */
    }
    
    .search-box input {
        font-size: 0.9rem;
    }
    
    #botao-busca {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }
    
    article h2 {
        font-size: 3rem;
        padding: 0.6rem;
        margin-top: 1rem;
    }
    
    article p {
        font-size: 0.8rem;
    }
}

/* ====== ANIMAÇÕES ADICIONAIS ====== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

article.card {
    animation: fadeIn 0.6s ease-out forwards;
}

/* ====== FONT AWESOME ICONS STYLING ====== */
/* Icons in buttons and headers */
i[class*="fas fa-"] {
    display: inline-block;
    margin-right: 0.5rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

/* Icons at the end of buttons (chevron-right, etc) */
i.fas:last-child {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Larger icons in headers */
.filters-header h3 i,
.filter-group h4 i {
    font-size: 1.1em;
    margin-right: 0.6rem;
}

/* Icons in buttons - size and alignment */
button i[class*="fas fa-"],
.btn-pagination i,
.btn-apply-filters i,
.btn-clear-filters i,
.btn-favoritar i {
    font-size: 0.95em;
    vertical-align: middle;
}

/* Theme toggle icon animation */
.theme-toggle i {
    display: inline-block;
    transition: transform var(--transition-normal);
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

/* Search icon */
.fas fa-search {
    color: var(--gojo-blue);
}

/* Pagination icons with hover effects */
.btn-pagination i.fas {
    transition: transform var(--transition-fast);
}

.btn-pagination:hover i.fas {
    transform: translateX(3px);
}

.btn-pagination:last-child:hover i.fas {
    transform: translateX(3px);
}

.btn-pagination:first-child:hover i.fas {
    transform: translateX(-3px);
}

/* Filter action button icons */
.btn-apply-filters i.fas {
    color: #00d100;
}

.btn-clear-filters i.fas {
    color: #ff6b6b;
}

/* Heart icon in favorites/favorites button */
.btn-favoritar i.fas,
.favorites-btn i.fas {
    color: var(--gojo-blue);
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.btn-favoritar.favorited i.fas {
    color: var(--sukuna-red);
    text-shadow: 0 0 10px var(--sukuna-red);
}

/* Chevron icons rotation in collapsible filters */
#btn-toggle-filters i.fas {
    transition: transform var(--transition-normal);
}

#btn-toggle-filters[aria-expanded="true"] i.fas {
    transform: rotate(180deg);
}

/* Error message search icon */
#msg-erro i.fas {
    margin-right: 0.8rem;
    color: var(--sukuna-red);
}

/* Dark mode - icon colors inherit from text color */
@media (prefers-color-scheme: dark) {
    i[class*="fas fa-"] {
        color: currentColor;
    }
}

/* Light mode - icon colors adapt */
html.light-theme .theme-toggle i,
html.light-theme .favorites-btn i {
    color: #0088ff;
}

html.light-theme .btn-apply-filters i {
    color: #009900;
}

html.light-theme .btn-clear-filters i {
    color: #dd0000;
}

/* ====== ACESSIBILIDADE ====== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====== SCROLLBAR PERSONALIZADA (Webkit - Chrome, Edge, Safari) ====== */
::-webkit-scrollbar {
    width: 10px;
    background-color: var(--bg-dark);
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-left: 1px solid #333;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gojo-blue), var(--gojo-purple));
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--sukuna-red), #990000);
}

/* Para Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--gojo-blue) var(--bg-dark);
}