/* ===========================
   Reset & Base
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #F9B236;
  --accent2: #107B4B;
  --text: #1a1a1a;
  --text-muted: #666666;
  --danger: #ef4444;
  --radius: 14px;
  --trans: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #2a2d40;
  border-radius: 99px;
}

/* ===========================
   Header
   =========================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  height: 58px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-icon {
  font-size: 1.3rem;
}

/* ===========================
   Main
   =========================== */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ===========================
   PDF Section
   =========================== */
.pdf-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pdf-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pdf-label-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-num {
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.3px;
}

.pdf-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

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

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans);
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.pdf-btn:hover {
  background: rgba(124, 106, 247, 0.12);
  border-color: var(--accent);
  color: var(--text);
}

/* ===========================
   PDF Embed Frame
   =========================== */
.pdf-embed-wrap {
  width: 100%;
  border-radius: var(--radius);
  overflow: auto;
  border: 1px solid var(--border);
  background: #1a1d2a;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  max-height: 88vh;
}

.pdf-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.pdf-page {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pdf-page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 10px;
}

.pdf-error {
  padding: 40px 20px;
  text-align: center;
  color: var(--danger);
  font-size: 0.95rem;
}

.external-link-message {
  text-align: center;
  padding: 60px 40px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.google-drive-embed {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 8px;
}

.folder-message {
  text-align: center;
  padding: 60px 40px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Divider */
.pdf-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin-top: 56px;
}

/* ===========================
   Section Heading
   =========================== */
.section-heading {
  padding: 60px 0 30px 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--accent);
}

.section-heading h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent2);
}

/* ===========================
   Empty State
   =========================== */
.empty {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.empty h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.empty p {
  line-height: 1.6;
}



/* ===========================
   Responsive
   =========================== */
/* Tablet (600px - 960px) */
@media (max-width: 960px) {
  .pdf-embed-wrap {
    max-height: 70vh;
  }
}

/* Mobile (max 600px) */
@media (max-width: 600px) {
  .header {
    padding: 0 16px;
    height: 50px;
  }

  .main {
    padding: 16px 12px 60px;
    gap: 30px;
  }

  .pdf-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pdf-actions {
    width: 100%;
  }

  .pdf-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  .pdf-embed-wrap {
    max-height: 50vh;
    padding: 12px;
  }
}

.pdf-embed-wrap iframe {
  height: 100%;
  min-height: 400px;
}

.pdf-mobile-card {
  padding: 40px 16px;
  gap: 12px;
}

.pdf-mobile-icon {
  font-size: 3rem;
}

.pdf-mobile-title {
  font-size: 0.9rem;
}

.pdf-mobile-btn {
  padding: 10px 24px;
  font-size: 0.9rem;
}

.pdf-title {
  font-size: 1rem;
}

.pdf-num {
  font-size: 0.65rem;
  padding: 2px 7px;
}


/* Small phones (max 360px) */
@media (max-width: 360px) {
  .main {
    padding: 12px 8px 40px;
  }

  .pdf-label-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .pdf-title {
    font-size: 0.9rem;
  }

  .pdf-embed-wrap {
    max-height: 45vh;
  }
}

/* ===========================
   Footer
   =========================== */
.footer {
  text-align: center;
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--accent2);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--trans);
}

.footer a:hover {
  color: #fff;
}
