/* Base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: 'Segoe UI', sans-serif; scroll-behavior: smooth; }

body {
  background: linear-gradient(120deg, #1a1a2e, #252545);
  color: #fff;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
}
body.light-mode {
  background: linear-gradient(120deg, #f5f5f5, #d9d9e0);
  color: #111;
}

/* Fixed Banner Ads */
.top-banner-ad, .bottom-banner-ad {
  position: fixed;
  width: 100%;
  text-align: center;
  z-index: 4000;
  background: #000;
}
.top-banner-ad { top: 0; }
.bottom-banner-ad { bottom: 0; }

/* Header */
.header {
  position: fixed;
  top: 90px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 3500;
}
body.light-mode .header {
  background: rgba(255,255,255,0.9);
}
.logo { font-size: 1.7em; font-weight: 700; color: #fff; }
body.light-mode .logo { color: #111; }

.controls { display: flex; align-items: center; gap: 10px; }

/* Search */
#searchInput {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  min-width: 180px;
}
#searchInput:focus { min-width: 280px; }

/* Dropdown */
.dropdown { position: relative; }
.dropbtn {
  background: #0077ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #1e1e2f;
  border-radius: 8px;
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 3600;
}
.dropdown-content a {
  color: #fff;
  padding: 10px 12px;
  display: block;
  text-decoration: none;
}
.dropdown-content a:hover { background: #0077ff; }
.dropdown:hover .dropdown-content { display: block; }

/* Quotes Container */
.quotes-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  padding: 180px 16px 140px;
}

/* Quote Card */
.quote-card {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px;
  transition: transform 0.25s ease;
}
.quote-card:hover { transform: translateY(-3px); }

.quote-text { font-size: 1rem; margin-bottom: 8px; }
.quote-author { font-size: .9rem; opacity: .8; }

/* Buttons */
.copy-share { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.copy-btn, .share-btn {
  background: #0077ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: .85rem;
}
.copy-btn:hover, .share-btn:hover { background: #005fcc; }

/* Popup */
.popup {
  position: fixed;
  bottom: 110px;
  right: 25px;
  background: #111;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  display: none;
  z-index: 4500;
}
