* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  height: 100vh;
  overflow: hidden;
}

/* ========== PÁGINA DE INICIO ========== */
body.home {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.home-container {
  text-align: center;
  padding: 40px 20px;
}

.home-container h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  color: #f1f5f9;
}

.subtitle {
  color: #94a3b8;
  margin-bottom: 50px;
  font-size: 1.15rem;
}

.home-buttons {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.home-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: #1e293b;
  border: 2px solid #334155;
  color: #e2e8f0;
  text-decoration: none;
  padding: 40px 50px;
  border-radius: 16px;
  font-size: 1.3rem;
  font-weight: 600;
  transition: all 0.25s ease;
  min-width: 200px;
}

.home-btn:hover {
  background: #1d4ed8;
  border-color: #3b82f6;
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(29, 78, 216, 0.35);
}

.home-btn .icon {
  font-size: 3rem;
}

/* ========== VISOR ========== */
.container {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 320px;
  background: #1e293b;
  border-right: 1px solid #334155;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #334155;
}

.back-btn {
  display: inline-block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 14px;
  transition: color 0.2s;
}

.back-btn:hover {
  color: #60a5fa;
}

.sidebar-header h2 {
  font-size: 1.3rem;
  color: #f1f5f9;
}

.pdf-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 12px;
}

.pdf-list li {
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
  word-break: break-all;
  border: 1px solid transparent;
}

.pdf-list li:hover {
  background: #334155;
}

.pdf-list li.active {
  background: #1d4ed8;
  border-color: #3b82f6;
  color: white;
}

.empty-message {
  color: #94a3b8;
  text-align: center;
  padding: 40px 20px !important;
  cursor: default !important;
}

.empty-message:hover {
  background: transparent !important;
}

/* Visor derecho */
.viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0f172a;
}

.viewer-header {
  padding: 16px 24px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  font-weight: 500;
  color: #94a3b8;
}

.viewer-content {
  flex: 1;
  position: relative;
  /* Fondo con el logo */
  background-image: url('images/logo.jpeg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 45%;
  background-color: #0f172a;
}

/* Oscurecemos un poco el logo para que no distraiga */
.viewer-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  z-index: 1;
}

#pdfViewer {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  position: relative;
  z-index: 2;
}

.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.15rem;
  z-index: 2;
  text-align: center;
  padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: 42%;
  }

  .viewer {
    height: 58%;
  }

  .home-btn {
    min-width: 160px;
    padding: 30px 30px;
  }

  .viewer-content {
    background-size: 60%;
  }
}