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

body {
  font-family: 'Inter', sans-serif;
  background: #0e0e0e;
  color: white;
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 230px;
  background: #151515;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 20px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  margin-bottom: 30px;
  color: #f5b942;
}

.logo img {
  height: 36px;
  object-fit: contain;
}

.menu a {
  display: block;
  padding: 10px;
  margin-bottom: 10px;
  text-decoration: none;
  color: white;
  border-radius: 6px;
  transition: background 0.2s;
}

.menu a:hover {
  background: #222;
}

.menu a.active {
  background: rgba(245, 185, 66, 0.15);
  color: #f5b942;
  font-weight: 600;
}

/* ===== MAIN ===== */
.main {
  flex: 1;
  padding: 30px;
}

/* ===== TARJETA DESTACADA ===== */
.featured {
  position: relative;
  overflow: hidden;
  padding: 70px 50px;
  border-radius: 14px;
  margin-bottom: 30px;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.featured-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,8,0,0.75), rgba(40,30,0,0.55));
  z-index: 1;
}

.featured-inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  width: 100%;
}

.featured-text {
  flex: 1;
  min-width: 180px;
}

.featured-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  margin: 4px 0 14px 0;
  font-style: italic;
}

.featured h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.featured p {
  opacity: 0.9;
  margin-bottom: 18px;
  font-size: 14px;
}

.featured button {
  background: black;
  color: #f5b942;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 6px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: 0.2s;
}

.featured button:hover {
  box-shadow: 0 0 15px rgba(245, 185, 66, 0.5);
}

/* ===== PORTADA LIBRO ===== */
.book-cover {
  width: 260px;
  height: 370px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 12px 50px rgba(0,0,0,0.6);
}

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

.main h3 {
  margin-bottom: 20px;
  font-size: 18px;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ===== CARD ===== */
.card {
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  transition: 0.3s;
  border: 1px solid rgba(255,255,255,0.05);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-color: rgba(245, 185, 66, 0.2);
}

.card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 15px;
}

.card-title {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 600;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 12px;
}

/* ===== BOTÓN VOTAR ===== */
.vote-btn {
  width: 100%;
  padding: 9px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: linear-gradient(120deg, #f5d487, #e0b45c, #a6782c);
  background-size: 200% 200%;
  color: black;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  transition: 0.3s;
  animation: goldShine 3s linear infinite;
}

.vote-btn:hover {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  transform: scale(1.02);
}

.vote-btn:disabled {
  background: #333;
  color: #666;
  animation: none;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes goldShine {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ===== TEXTO DORADO BRILLANTE ===== */
.logo,
.featured h2,
.featured-subtitle {
  text-shadow:
    0 0 8px rgba(255,215,0,0.6),
    0 0 20px rgba(255,185,56,0.4);
}

.featured-subtitle {
  color: rgba(255,255,255,0.8);
}

/* ===== ESTRELLITAS DORADAS ===== */
.spark {
  position: fixed;
  bottom: -10px;
  background: #ffb938;
  border-radius: 50%;
  box-shadow: 0 0 8px #ffd700, 0 0 16px #ffb938;
  pointer-events: none;
  z-index: 9999;
  animation: sparkFloat linear forwards;
}

@keyframes sparkFloat {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 0.8; }
  100% { transform: translateY(-110vh) scale(0); opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  body { flex-direction: column; }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
  }

  .logo { margin-bottom: 0; }

  .menu {
    display: flex;
    gap: 6px;
  }

  .menu a {
    margin-bottom: 0;
    padding: 6px 10px;
    font-size: 12px;
  }

  .main { padding: 20px; }
}
