/* ===== Variáveis Globais e Reset ===== */
:root {
    --primary-color: #6A1B9A; /* Roxo principal */
    --secondary-color: #228B22; /* Verde secundário */
    --accent-color: #FFD700; /* Dourado/Amarelo */
    
    /* Variáveis do Modo Claro (Padrão) */
    --text-color: #212529; /* Preto suave */
    --light-text-color: #6c757d; /* Cinza para parágrafos */
    --background-color: #f8f9fa; /* Fundo principal */
    --white-color: #ffffff; /* Fundo dos cards e seções */
    --border-color: #e0e0e0;
    --input-bg: #ffffff;

    /* Variáveis do Modo Escuro (Serão ativadas com .dark-mode) */
    --dark-text: #f0f0f0;
    --dark-light-text: #a9a9a9;
    --dark-background: #121212;
    --dark-card-bg: #1e1e1e;
    --dark-border-color: #333;
    --dark-input-bg: #2d2d2d;
    
    --border-radius: 15px;
    --shadow: 0 8px 25px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 30px rgba(106, 27, 154, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Tema Escuro ===== */
body.dark-mode {
    --text-color: var(--dark-text);
    --light-text-color: var(--dark-light-text);
    --background-color: var(--dark-background);
    --white-color: var(--dark-card-bg);
    --border-color: var(--dark-border-color);
    --input-bg: var(--dark-input-bg);
    --shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* ===== Header Aprimorado ===== */
header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff; /* Texto do header sempre branco */
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 25px 25px;
    animation: moveBackground 30s linear infinite;
    pointer-events: none;
}

@keyframes moveBackground {
    from { transform: translate(0, 0); }
    to { transform: translate(-25px, -25px); }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-title {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.site-title span {
    color: var(--accent-color);
    font-size: 1.4rem;
    font-weight: 600;
}

/* Navegação Aprimorada */
nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center; /* Alinha o botão de tema */
}

nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    border: 2px solid transparent;
}

.nav-icon {
    font-size: 1.2em;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

nav a:hover, nav a:focus-visible {
    background: var(--accent-color);
    color: #212529; /* Texto escuro no hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,215,0,0.4);
    outline: none;
}

/* Botão de tema */
#theme-toggle-btn {
    padding: 0.8rem; /* Ajuste para ícone sozinho */
    width: 45px;
    height: 45px;
    justify-content: center;
}
#theme-toggle-btn .nav-icon {
    font-size: 1.3rem;
    margin: 0;
    padding: 0;
}

/* Decoração do Header */
.header-decoration {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    opacity: 0.9;
}

.decoration-item {
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.decoration-item:nth-child(2) { animation-delay: 0.7s; }
.decoration-item:nth-child(3) { animation-delay: 1.4s; }
.decoration-item:nth-child(4) { animation-delay: 2.1s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ===== Seção de Introdução e Filtros ===== */
.intro-section {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--white-color);
    margin-bottom: 3rem;
    transition: background-color 0.3s ease;
}

.intro-section h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.intro-section p {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    color: var(--light-text-color);
}

.search-filter {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(106, 27, 154, 0.15);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-btn {
    padding: 10px 20px;
    background: #e9ecef;
    color: var(--light-text-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

body.dark-mode .filter-btn {
    background-color: var(--dark-input-bg);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: #ffffff; /* Texto sempre branco no active/hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ===== Grid de Cards Aprimorado ===== */
#destaques-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: var(--text-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background: var(--white-color);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-artista { background: var(--accent-color); color: #212529; }
.badge-cosplayer { background: var(--primary-color); color: #ffffff; }
.badge-influencer { background: var(--secondary-color); color: #ffffff; }

.card-img-container {
    height: 220px;
    overflow: hidden;
    cursor: pointer; /* NOVO: Indica que a imagem é clicável */
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover .card-img-container img {
    transform: scale(1.08);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.card p {
    color: var(--light-text-color);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.toggle-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 27, 154, 0.3);
}

.toggle-btn i {
    transition: transform 0.3s ease;
}

.toggle-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.card-expanded-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
    background: #f9f9f9;
    padding: 0 1.5rem;
    color: var(--light-text-color);
}

body.dark-mode .card-expanded-content {
    background: var(--dark-background);
}

.card-expanded-content.active {
    max-height: 500px;
    opacity: 1;
    padding: 1.5rem;
}

/* ===== Seção de Curiosidades ===== */
.curiosidades-section {
    padding: 4rem 1.5rem;
    margin-top: 4rem;
    background: var(--white-color);
    transition: background-color 0.3s ease;
}

#curiosidades-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.curiosidades-section > p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--light-text-color);
}

.curiosidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.curiosidade-card {
    text-align: center;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.curiosidade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.curiosidade-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.curiosidade-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.curiosidade-card p {
    color: var(--light-text-color);
}

/* ===== Footer Aprimorado ===== */
footer {
    background: #1c1c1c; /* Footer sempre escuro */
    color: #a9a9a9;
    padding: 4rem 1.5rem 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #ffffff;
}

.footer-section p {
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.footer-section a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-section a:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    max-width: 1200px;
    margin: 0 auto;
    color: #888;
}

/* ===== NOVO: Botão Voltar ao Topo ===== */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--primary-color);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px) scale(1.05);
}

/* ===== NOVO: Estilos do Modal (Lightbox) ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal {
    display: none; /* Escondido por padrão */
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation: zoomIn 0.3s;
    border-radius: 5px;
}

#modal-caption {
    margin: 15px auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    font-size: 1.1rem;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    outline: none;
}

/* ===== Media Queries para Responsividade ===== */
@media (max-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        line-height: 1.6;
    }

    .header-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 0.5rem;
    }

    nav ul {
        justify-content: center;
    }
    
    .intro-section {
        padding: 3rem 1rem;
    }

    .cards-grid {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 1rem;
    }
    
    nav ul {
        gap: 0.5rem;
    }
    
    nav a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    #theme-toggle-btn {
        width: 40px;
        height: 40px;
    }
    
    .header-decoration {
        display: none;
    }
    
    .modal-content {
        width: 90%;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* ===== Acessibilidade: toolbar flutuante ===== */
#accessibility-toolbar {
  position: fixed;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.95);
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  z-index: 9999;
  align-items: center;
}

#accessibility-toolbar .acc-btn {
  background: transparent;
  border: 1px solid #ddd;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  min-width: 44px;
  min-height: 44px;
}

#accessibility-toolbar .acc-btn:focus,
#accessibility-toolbar .acc-btn:hover {
  outline: 3px solid rgba(34,139,34,0.18);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

#accessibility-toolbar .acc-btn i {
  pointer-events: none;
}

/* sr-only (visível apenas para leitores de tela) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ALTO CONTRASTE */
body.high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

body.high-contrast a { color: #00ffff !important; }
body.high-contrast header, body.high-contrast footer, body.high-contrast .card {
  background-color: #000 !important;
  border-color: #fff !important;
  box-shadow: none !important;
}

/* Fonte escalável via classe no body */
:root { --site-font-scale: 1; }
body { font-size: calc(16px * var(--site-font-scale)); }

/* adaptações no toolbar para telas pequenas */
@media (max-width: 480px) {
  #accessibility-toolbar { left: 8px; bottom: 8px; gap: 6px; padding: 6px; }
  #accessibility-toolbar .acc-btn { padding: 6px; font-size: 14px; min-width:40px; min-height:40px;}
}

/* ===== Ícones de contato no footer ===== */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2c2c2c;
  color: #ffffff;
  transition: all 0.3s ease;
  border: 1px solid #444;
}

.social-icons a:hover,
.social-icons a:focus-visible {
  background: var(--accent-color);
  color: #212529;
  transform: translateY(-3px) scale(1.05);
  outline: none;
}

.social-icons svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
