/* --- Global Reset & Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-image: url('dreams.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: transparent; /* Removes dark blocking */
  color: #ffffff;
  font-family: Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
/* --- Watermark --- */
.watermark {
  position: fixed;
  bottom: 10px;
  right: 15px;
  color: rgba(51, 153, 255, 0.15);
  font-size: 2.5rem;
  font-weight: bold;
  pointer-events: none;
  z-index: 0;
  text-transform: lowercase;
}

/* --- Header & Top Bar --- */
.top-bar {
  width: 100%;
  background-color: #091428;
  border-bottom: 1px solid #3399ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px;
  z-index: 10;
}

.top-banner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
}

.top-nav {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}

.home-link {
  color: #3399ff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

.home-link:hover {
  color: #ffcc00;
}

.page-title {
  color: #ffcc00;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* --- Main Layout Wrapper --- */
.main-wrap {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  z-index: 1;
}

/* --- Controls Section --- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 27, 42, 0.7);
  border: 1px solid #3399ff;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 0 15px rgba(51, 153, 255, 0.15);
  font-size: 0.9rem;
  color: #a0c4ff;
}

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

#searchInput {
  background: #050b14;
  border: 1px solid #3399ff;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  outline: none;
  font-size: 0.95rem;
  width: 240px;
  transition: box-shadow 0.2s;
}

#searchInput:focus {
  box-shadow: 0 0 8px rgba(51, 153, 255, 0.6);
}

/* --- Buttons --- */
.btn {
  background: #3399ff;
  color: #050b14;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
}

.btn.ghost {
  background: transparent;
  color: #3399ff;
  border: 1px solid #3399ff;
}

.btn.ghost:hover {
  background: rgba(51, 153, 255, 0.1);
  color: #ffcc00;
  border-color: #ffcc00;
}

/* --- Stats Tracker --- */
.stats {
  font-size: 0.85rem;
  color: #8ab4f8;
  margin-bottom: 15px;
  padding-left: 5px;
}

/* --- Cards Grid Container --- */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  margin-bottom: 30px;
}

.card {
  background: rgba(10, 25, 50, 0.85);
  border: 1px solid #3399ff;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 0 10px rgba(51, 153, 255, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(51, 153, 255, 0.4);
  border-color: #ffcc00;
}

.card-category {
  font-size: 0.75rem;
  color: #ffcc00;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: bold;
}

.card-text {
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.4;
}

/* --- Load More Button --- */
.load-more-btn {
  display: block;
  margin: 0 auto 40px auto;
  background: transparent;
  color: #3399ff;
  border: 2px solid #3399ff;
  padding: 10px 30px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: #3399ff;
  color: #050b14;
  box-shadow: 0 0 15px rgba(51, 153, 255, 0.5);
}

/* --- Modal Overlay & Box --- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 11, 20, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: #091428;
  border: 2px solid #3399ff;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  color: white;
  position: relative;
  box-shadow: 0 0 30px rgba(51, 153, 255, 0.4);
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-title {
  color: #ffcc00;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.25rem;
  line-height: 1.3;
}

#modalAnswerText {
  color: #e0f0ff;
  font-size: 1.05rem;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  color: #a0c4ff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ffcc00;
}

.modal-close::before {
  content: "✕";
}

/* --- Footer & Donation Styling --- */
center {
  margin: 30px 0;
  z-index: 1;
  position: relative;
}

.footer {
  width: 100%;
  background-color: #091428;
  border-top: 1px solid #3399ff;
  text-align: center;
  padding: 15px;
  font-size: 0.85rem;
  color: #8ab4f8;
  z-index: 10;
  margin-top: auto;
}

/* --- Responsive adjustments --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeIn 0.3s ease forwards;
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .controls-left, .controls-right {
    width: 100%;
    justify-content: space-between;
  }
  #searchInput {
    width: 100%;
  }
}
/* --- Popular Suggestions & Category Pills --- */
.popular-suggestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  background: rgba(13, 27, 42, 0.75);
  border: 1px solid #3399ff;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(51, 153, 255, 0.15);
}

.suggestion-label {
  font-size: 0.8rem;
  color: #ffcc00;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  background: rgba(51, 153, 255, 0.15);
  border: 1px solid #3399ff;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  background: #ffcc00;
  color: #050b14;
  border-color: #ffcc00;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.5);
  transform: translateY(-2px);
}