/* ===== GLOBAL STYLES ===== */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fdfdfd;
  color: #333;
  transition: background-color 0.3s, color 0.3s;
}

a {
  text-decoration: none;
  color: inherit;
}

h1, h2 {
  margin: 0 0 10px 0;
}

/* ===== HEADER ===== */
header {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  padding: 30px 20px;
  text-align: center;
  position: relative;
}

.header-actions {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.search-bar {
  transition: width 0.3s ease, box-shadow 0.3s ease;
  width: 180px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
}

.search-bar:focus {
  width: 250px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  outline: none;
  border-color: #fff;
}

#darkModeToggle {
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  padding: 6px 10px;
  border-radius: 50%;
  border: none;
  background-color: #fff;
  color: #3498db;
  font-size: 1rem;
}

#darkModeToggle:hover {
  transform: scale(1.2);
  background-color: #2980b9;
  color: #fff;
}

/* ===== MAIN CONTENT ===== */
main {
  padding: 30px 20px;
}

.subjects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

/* ===== CARD STYLES ===== */
.card {
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column; /* ensures pdf-list stretches */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.card i {
  color: #3498db;
  margin-bottom: 10px;
}

.card h2 {
  margin-bottom: 15px;
  font-size: 1.4rem;
  color: #222;
}

/* ===== PDF BOXES ===== */
.pdf-list {
  flex-grow: 1;
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pdf-box {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: #3498db;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background-color 0.3s, transform 0.2s;
}

.pdf-box:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.pdf-box i {
  font-size: 1rem;
}

/* Highlight search matches */
.pdf-box mark {
  background-color: yellow;
  color: #000;
  padding: 0 2px;
  border-radius: 2px;
}

body.dark-mode .pdf-box mark {
  background-color: #ffc107;
  color: #111;
}

/* Scrollbar styling for PDF list */
.pdf-list::-webkit-scrollbar {
  width: 6px;
}

.pdf-list::-webkit-scrollbar-thumb {
  background-color: #3498db;
  border-radius: 3px;
}

/* ===== DOWNLOAD BUTTON ===== */
.btn {
  display: inline-block;
  background-color: #2ecc71;
  color: #fff;
  padding: 8px 16px;
  border-radius: 25px;
  transition: background-color 0.3s, transform 0.2s;
  font-weight: 500;
  text-align: center;
}

.btn:hover {
  background-color: #27ae60;
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 12px 0;
  font-size: 0.8rem;
  color: #888;
  background-color: #f0f0f0;
}

/* ===== DARK MODE STYLES ===== */
body.dark-mode {
  background-color: #111;
  color: #eee;
}

body.dark-mode a {
  color: #90cdf4;
}

body.dark-mode .card {
  background-color: #2c2c2c;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

body.dark-mode .pdf-box {
  background-color: #2980b9;
  color: #fff;
}

body.dark-mode .pdf-box:hover {
  background-color: #3498db;
}

body.dark-mode .btn {
  background-color: #27ae60;
}

body.dark-mode .btn:hover {
  background-color: #2ecc71;
}

body.dark-mode header {
  background: linear-gradient(135deg, #2980b9, #3498db);
}

body.dark-mode #darkModeToggle {
  background-color: #fff;
  color: #3498db;
}
.download-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 9999px;          /* pill shape */
  background: linear-gradient(45deg,#4facfe,#00f2fe);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}
.download-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
