/* ========== Cards Grid + Sections + Footer + Admin ========== */

/* ========== SECTIONS ========== */
.section { padding: 40px 0 20px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.section-header h2 i { color: var(--accent); margin-right: 8px; }

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--border);
}

.card-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card-poster img { transform: scale(1.08); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover .card-overlay { opacity: 1; }

.card-play {
  font-size: 2.5rem;
  color: var(--accent);
  filter: drop-shadow(0 4px 12px rgba(0, 212, 170, 0.3));
}

.card-rating {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.card-quality {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
}

.card-info { padding: 10px 12px 14px; }
.card-info h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info span { font-size: 0.72rem; color: var(--text-dim); }

/* ========== LOADING ========== */
.loading-pulse {
  aspect-ratio: 2/3;
  background: linear-gradient(110deg, var(--bg-card) 30%, #1a1a28 50%, var(--bg-card) 70%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* ========== FOOTER ========== */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner { text-align: center; }
.footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

footer p { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 16px; }

.footer-links { display: flex; justify-content: center; gap: 20px; }
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* ========== ADMIN PANEL ========== */
#admin-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100vh;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border-left: 1px solid var(--border);
  z-index: 9999;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

#admin-panel.active { right: 0; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1rem;
}

.admin-header button {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.admin-body { padding: 20px; }

.admin-section h3 {
  font-size: 0.9rem;
  margin-bottom: 14px;
  color: var(--accent);
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.85rem;
}

.admin-item:hover { background: rgba(255, 255, 255, 0.08); }
.admin-heat { color: #ff6b35; font-weight: 600; font-size: 0.8rem; }

.admin-caption {
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 8px;
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 14px;
  word-break: break-word;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-actions button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font);
  transition: background 0.2s;
}

.admin-actions button:hover { background: rgba(255, 255, 255, 0.08); }
.admin-loading { text-align: center; padding: 40px; color: var(--text-dim); }
.admin-error { text-align: center; padding: 20px; color: #ff5555; }

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 768px) {
  #hero { height: 60vh; min-height: 380px; }

  .hero-overlay {
    background: linear-gradient(to right, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0.6) 100%),
                linear-gradient(to top, rgba(10,10,15,1) 0%, transparent 50%);
  }

  .hero-content { left: 20px; bottom: 30px; max-width: 60%; }
  .hero-content h2 { font-size: 1.5rem; }
  .hero-desc { display: none; }
  .hero-poster { display: block; }
  .hero-btn { padding: 10px 20px; font-size: 0.85rem; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }

  #admin-panel { width: 100%; right: -100%; }
}

/* Mobile */
@media (max-width: 480px) {
  #hero { height: 55vh; min-height: 320px; }

  .hero-overlay {
    background: linear-gradient(to top, rgba(10,10,15,1) 0%, rgba(10,10,15,0.7) 50%, rgba(10,10,15,0.3) 100%);
  }

  .hero-content {
    left: 16px;
    right: 16px;
    bottom: 20px;
    max-width: 65%;
  }

  .hero-content h2 { font-size: 1.2rem; margin-bottom: 6px; }
  .hero-meta { gap: 10px; font-size: 0.8rem; margin-bottom: 8px; }
  .hero-badge { font-size: 0.6rem; padding: 2px 8px; margin-bottom: 8px; }
  .hero-btn { padding: 8px 16px; font-size: 0.8rem; }
  .hero-poster { width: 100px; right: 16px; bottom: 20px; }

  .logo { font-size: 1.1rem; }
  .search-box { max-width: 180px; }
  .search-box input { padding: 8px 12px 8px 34px; font-size: 0.8rem; }
  .search-icon { left: 10px; font-size: 0.8rem; }

  .section { padding: 24px 0 10px; }
  .section-header h2 { font-size: 1.1rem; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .card-info h3 { font-size: 0.75rem; }
  .card-info span { font-size: 0.65rem; }
  .card-info { padding: 6px 8px 10px; }
  .card-rating { font-size: 0.6rem; padding: 1px 5px; }
  .card-quality { font-size: 0.55rem; padding: 1px 4px; }
}

/* Small phones */
@media (max-width: 360px) {
  .hero-content h2 { font-size: 1rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-poster { width: 80px; }
}

