:root {
    --bg-dark: #040D12;
    --bg-light: #f3f3f3;
    --accent: #C63C51;
    --text-dark: #e0e0e0;
    --text-light: #2c2c2c;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-current: var(--bg-dark);
    --text-current: var(--text-dark);
    --nav-bg: rgba(4, 13, 18, 0.95);
}

[data-theme="light"] {
    --bg-current: var(--bg-light);
    --text-current: var(--text-light);
    --nav-bg: rgba(243, 243, 243, 0.95);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-current);
    color: var(--text-current);
    transition: var(--transition);
    overflow-x: hidden;
}

/* Navbar */
#navbar {
    position: fixed; top: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%;
    background: var(--nav-bg);
    border-bottom: 2px solid var(--accent);
    z-index: 1000;
}

.logo { font-weight: 700; color: var(--accent); letter-spacing: 2px; font-size: 1.2rem; }

#navbar ul { display: flex; list-style: none; }
#navbar ul li a {
    color: var(--text-current); text-decoration: none;
    margin-left: 20px; font-weight: bold; font-size: 0.8rem; text-transform: uppercase;
}

#theme-toggle { background: none; border: none; cursor: pointer; font-size: 1.2rem; margin-left: 15px; }

/* Estrutura de Seções */
.content-section { padding: 100px 5% 50px; min-height: 100vh; }
.main-header { text-align: left; margin-bottom: 30px; }
.library-title { font-size: 2.5rem; border-left: 5px solid var(--accent); padding-left: 15px; }

/* Grid de Livros (Estilo Pobreflix) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 colunas no PC */
    gap: 15px;
}

.book-card {
    position: relative;
    aspect-ratio: 2 / 3;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover { transform: scale(1.05); z-index: 5; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }

.book-card img { width: 100%; height: 100%; object-fit: cover; }

.badge-hd {
    position: absolute; top: 8px; right: 8px;
    background: #FFD700; color: #000;
    font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 3px;
}

.book-info {
    position: absolute; bottom: 0; width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 25px 10px 10px;
}

.book-info h3 {
    color: #fff; font-size: 0.8rem; font-weight: 300;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Coleções e Contato */
.alternate-bg { background: rgba(198, 60, 81, 0.05); }
.grid-collections { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 20px; }
.collection-card { padding: 20px; border: 1px solid var(--accent); flex: 1; min-width: 200px; text-align: center; }

.simple-form { display: flex; flex-direction: column; max-width: 600px; gap: 15px; margin-top: 30px; }
.simple-form input, .simple-form textarea {
    padding: 12px; background: rgba(255,255,255,0.05); 
    border: 1px solid var(--accent); color: var(--text-current); font-family: inherit;
}

.btn-main { background: var(--accent); color: white; border: none; padding: 15px; cursor: pointer; font-weight: bold; }

/* Responsividade */
@media (max-width: 1024px) { .grid-container { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) { .grid-container { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) {
    #navbar ul { display: none; }
    .grid-container { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .library-title { font-size: 1.8rem; }
}
