/* ===== COLORS ===== */
:root {
  --primary-color: #034e4f;
  --secondary-color: #0e2422;
  --bg-light: #f9fbfb; /* Slightly off-white to make glass pop more */
  --bg-dark: #121212;
  --text-light: #222222;
  --text-dark: #f5f5f5;
  --text-muted-light: #666666;
  --text-muted-dark: #aaaaaa;
  --card-light: #ffffff;
  --card-dark: #2c2c2c;
  --card-text-light: #222222;
  --card-text-dark: #f5f5f5;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== GLOBAL ===== */
body {
  margin: 0;
  font-family: var(--font-family);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color 0.3s, color 0.3s;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

section { margin-bottom: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.8rem; }
p, li { font-size: 1rem; margin-bottom: 0.75rem; }
ul { padding-left: 1.5rem; margin-bottom: 1rem; }

/* ===== HEADER ===== */
header {
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  margin-bottom: 0rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.logo { height: 50px; }
.nav-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav-right a { color: white; text-decoration: none; font-weight: 600; font-size: 1rem; }

/* ===== FOOTER ===== */
footer {
  background: var(--primary-color);
  color: white;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-left img { height: 50px; }
.social-links { display: flex; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; }
.social-links a { font-size: 1.8rem; transition: transform 0.3s; }
.social-links a:hover { transform: scale(1.2); }
.social-links a.facebook { color: #1877F2; }
.social-links a.youtube { color: #FF0000; }
.social-links a.whatsapp { color: #25D366; }
.social-links a.telegram { color: #0088cc; }
.social-links a.playstore { 
  background: linear-gradient(45deg, #4285F4, #0F9D58, #F4B400, #DB4437);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== NEW DONATION INPUT ROW ===== */
.donation-toggle {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.donation-action-row {
  display: flex;
  gap: 12px;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

#donationAmount {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.1);
  background: var(--card-light);
  color: var(--text-light);
  height: auto;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

body.dark #donationAmount {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.1);
  color: var(--text-dark);
}

#donationAmount:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 8px rgba(0, 150, 136, 0.5);
}

#tiersContainer {
  display: flex;
  gap: 8px;
}

.tier-btn {
  background: transparent;
  color: var(--text-light);
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

body.dark .tier-btn {
  border-color: rgba(255,255,255,0.1);
  color: var(--text-dark);
}

.tier-btn:hover {
  background: rgba(0, 150, 136, 0.1) !important;
  border-color: var(--secondary-color) !important;
  color: var(--secondary-color) !important;
}

.tier-btn.active-toggle {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

/* ===== TEAL BUTTON & GOLD SHINE ===== */
#donateBtn {
  width: 100%;
  padding: 16px;
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: 12px;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
}

#donateBtn:hover {
  background-color: var(--secondary-color);
}

/* Golden Pulse Notification Animation */
@keyframes donateShine {
  0% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0.8); transform: scale(1); }
  50% { box-shadow: 0 0 30px 15px rgba(255, 170, 0, 0); transform: scale(1.02); }
  100% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0); transform: scale(1); }
}

.btn-shine-active {
  animation: donateShine 0.6s ease-out;
}

/* ===== MINIMAL CURRENCY PICKER ===== */
.quiet-currency-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.8rem;
}

#conversionNote {
  font-size: 0.85rem;
  color: var(--text-muted-light);
  margin: 0;
  font-weight: 600;
}

body.dark #conversionNote { color: var(--text-muted-dark); }

.currency-input-wrapper {
  background: rgba(0,0,0,0.04);
  border-radius: 20px;
  padding: 4px 14px 4px 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  transition: border 0.3s, background 0.3s;
  position: relative;
}

body.dark .currency-input-wrapper {
  background: rgba(255,255,255,0.05);
}

.currency-input-wrapper:focus-within {
  border: 1px solid var(--secondary-color);
  background: transparent;
}

#currencyFlag {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  pointer-events: none;
}

#currencySearch {
  background: transparent;
  border: none;
  height: 28px;
  padding: 0 10px 0 30px;
  font-size: 0.85rem;
  font-weight: 600;
  width: 100px;
  color: var(--text-light);
}

body.dark #currencySearch { color: var(--text-dark); }
#currencySearch:focus { outline: none; }
#currencySelect { display: none; }

#currencyList {
  position: absolute;
  top: 100%;
  right: 0;
  width: max-content;
  min-width: 100%;
  max-width: 280px;
  background-color: var(--card-light);
  color: var(--card-text-light);
  border: 1px solid #ccc;
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  margin-top: 5px;
  list-style: none;
  padding: 0;
}

body.dark #currencyList {
  background-color: var(--card-dark);
  color: var(--card-text-dark);
  border-color: #444;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

#currencyList li {
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  transition: background-color 0.2s, color 0.2s;
}

#currencyList li:hover {
  background-color: var(--secondary-color);
  color: #ffffff;
}

#currencyList img {
  border-radius: 2px;
  flex-shrink: 0;
  width: 20px;
  height: 14px;
  object-fit: cover;
}

#currencySearch, #currencyList {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI", system-ui, sans-serif;
  font-variant-emoji: emoji;
}

/* ===== PREMIUM GLASS DONOR MESSAGES ===== */
.glass-donor-card {
  /* Frosted gradient effect */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  /* Inner-light border trick */
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 1px solid rgba(255, 255, 255, 0.9);
  
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 1.2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  direction: ltr !important;
  transition: transform 0.3s, box-shadow 0.3s;
}

body.dark .glass-donor-card {
  background: linear-gradient(135deg, rgba(40, 40, 40, 0.7), rgba(20, 20, 20, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-donor-card:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
body.dark .glass-donor-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.glass-donor-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.glass-donor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.glass-donor-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.glass-donor-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-light);
}

body.dark .glass-donor-name { color: var(--text-dark); }

/* Container holding multiple messages from one donor */
.glass-msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 56px; /* Aligns with name, skipping avatar */
}

/* Individual message bubble inside the card */
.glass-msg-item {
  background: rgba(0, 0, 0, 0.04);
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 3px solid var(--secondary-color);
}

body.dark .glass-msg-item {
  background: rgba(255, 255, 255, 0.05);
}

/* The date above the message */
.glass-msg-date {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted-light);
  margin-bottom: 4px;
}

body.dark .glass-msg-date { color: var(--text-muted-dark); }

/* The message text */
.glass-msg-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-light);
}

body.dark .glass-msg-text { color: var(--text-dark); }

#leaveMessageBtn {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: -20px;
  padding: 10px 10px;
  font-size: 1rem;
  font-weight: 800;
  background: #ffaa00; 
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

#leaveMessageBtn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.35); }
#leaveMessageBtn:disabled { opacity: 0.5; cursor: not-allowed; }

.support-head { font-size: 1.9rem; margin-bottom:0.5rem; margin-top:0rem; color:var(--primary-color); }
.support-text { font-size: 1rem; line-height: 1.6; margin-bottom:1.8rem; font-weight:500; }

/* ===== MEDIA QUERIES ===== */
@media (max-width: 900px) {
  #donorMessageModal { overflow-y: auto; align-items: flex-start; padding-top: 5vh; }
  .container > div[style*="display:grid"] { grid-template-columns: 1fr !important; gap: 0.5rem !important; }
  .container { padding: 0 0.8rem !important; }
  #leaveMessageBtn { margin-top: -1px; width: 100%; }
  .support-text { font-size: 1rem; line-height: 1.5; margin-bottom:1.5rem; }
  .support-head { font-size: 1.5rem; margin-bottom:0.4rem; margin-top:0rem; }
  .donation-toggle { gap: 0.5rem !important; width: 100% !important; margin-bottom: 1rem !important; }
  #oneTimeBtn, #monthlyBtn { width: 48% !important; flex: 1; padding: 12px 5px !important; font-size: 0.9rem !important; }
  
  .donation-action-row { flex-direction: column; }
  #tiersContainer { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .tier-btn { padding: 12px 0; font-size: 0.85rem; }
  .glass-donor-msg { padding-left: 0; margin-top: 5px; } 

  .donor-grids-wrapper { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  
  .quiet-currency-row { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 1rem;}
  #conversionNote { text-align: left; margin-bottom: 5px; }
  .currency-input-wrapper { width: 100%; display: flex; box-sizing: border-box; }
  #currencySearch { flex: 1; width: 100%; }
  #currencyList { right: auto; left: 0; width: 100%; max-width: none; }
}