.past-papers-page {
  padding: 2rem 0 3rem;
}

.past-papers-page .container {
  max-width: 1100px;
  margin: 0 auto;
}

.past-papers-header {
  margin-bottom: 1.5rem;
}

.past-papers-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #1b1f23;
}

.past-papers-header p {
  font-size: 1.1rem;
  color: #4b5563;
  margin: 0;
}

.past-papers-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.past-papers-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 220px;
}

.past-papers-field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
}

.past-papers-field select {
  padding: 0.7rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 0.95rem;
  color: #111827;
}

.past-papers-section-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #111827;
}

.past-paper-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.past-paper-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.7rem;
  color: #111827;
}

.past-paper-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.past-paper-meta div {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.past-paper-meta span {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pdf-frame {
  margin-top: 1rem;
  border: 1px solid #dbe1e8;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
}

.pdf-frame iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: none;
}

.past-papers-empty {
  background: #ffffff;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  padding: 1.5rem;
  color: #4b5563;
}

.past-papers-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.past-papers-link:hover {
  text-decoration: underline;
}

.past-paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.past-paper-actions .past-papers-link {
  margin-bottom: 0;
}

.past-papers-secondary-link {
  color: #6d28d9;
}

.past-papers-ai {
  margin-top: 2rem;
}

.past-papers-ai .ai-assistant-box {
  margin-top: 0;
}

.past-papers-upgrade {
  margin-top: 0.85rem;
}

.past-papers-upgrade a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.past-papers-upgrade a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .past-papers-page {
    padding: 1.25rem 0 2rem;
  }

  .past-papers-header h1 {
    font-size: 2rem;
  }

  .past-papers-section-title {
    font-size: 1.6rem;
  }

  .pdf-frame iframe {
    height: 600px;
  }
}
