

:root {
  --primary: #2196F3;
  --primary-light: #64B5F6;
  --bg-primary: #09090D;
  --bg-secondary: #12121A;
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --success: #06FFA5;
  --warning: #FFC93C;
  --error: #FF4757;
  --font-primary: 'Tektur', sans-serif;
  --font-mono: 'Orbitron', sans-serif;
  --shadow-base: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.6);
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#grid {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(33, 150, 243, 0.05) 50px, rgba(33, 150, 243, 0.05) 51px), repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(33, 150, 243, 0.05) 50px, rgba(33, 150, 243, 0.05) 51px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(33, 150, 243, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  box-shadow: var(--shadow-base);
}

.header-left { display: flex; align-items: center; }
.header-left a { display: flex; align-items: center; gap: 8px; color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.9em; transition: color var(--transition); }
.header-left a:hover { color: var(--primary-light); }
.header-left i { font-size: 1.2em; }

.header-center { flex: 1; text-align: center; }
.header-center h1 { font-family: var(--font-mono); font-size: 1.2em; font-weight: 700; letter-spacing: 2px; color: var(--text-primary); }

.header-right { display: flex; align-items: center; gap: 15px; }

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

.wallet-address { font-family: var(--font-mono); font-size: 0.85em; color: var(--text-secondary); display: none; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.wallet-address.connected { display: block; color: var(--success); }

.connect-wallet-btn { padding: 8px 16px; background: rgba(33, 150, 243, 0.1); border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-primary); font-weight: 600; font-size: 0.85em; cursor: pointer; border-radius: 6px; transition: all var(--transition); text-transform: uppercase; letter-spacing: 0.5px; }
.connect-wallet-btn:hover { background: rgba(33, 150, 243, 0.2); box-shadow: inset 0 0 12px rgba(33, 150, 243, 0.2); }

main { flex: 1; margin-top: 56px; position: relative; z-index: 1; padding: 20px; }

#container { max-width: 1200px; margin: 0 auto; }

.intro-section { text-align: center; margin-bottom: 40px; padding: 30px; background: var(--bg-secondary); border: 1px solid rgba(33, 150, 243, 0.2); border-radius: 8px; box-shadow: var(--shadow-base); }
.intro-section h2 { font-family: var(--font-mono); font-size: 1.6em; margin-bottom: 15px; font-weight: 700; color: var(--text-primary); }
.intro-section p { color: var(--text-secondary); line-height: 1.6; max-width: 700px; margin: 0 auto; font-size: 0.95em; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-bottom: 40px; }

.feature-card { background: var(--bg-secondary); border: 1px solid rgba(33, 150, 243, 0.2); border-radius: 8px; padding: 20px; transition: all var(--transition); cursor: pointer; display: flex; flex-direction: column; }
.feature-card:hover { border-color: var(--primary); box-shadow: var(--shadow-elevated), inset 0 0 20px rgba(33, 150, 243, 0.1); transform: translateY(-4px); }
.feature-card.completed { border-color: var(--success); background: rgba(6, 255, 165, 0.05); }

.feature-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 10px; }
.feature-title { font-family: var(--font-mono); font-size: 1.1em; font-weight: 700; color: var(--text-primary); flex: 1; }
.feature-ticker { font-family: var(--font-mono); font-size: 0.75em; padding: 4px 10px; background: rgba(33, 150, 243, 0.2); border: 1px solid var(--primary); border-radius: 4px; color: var(--primary); font-weight: 600; white-space: nowrap; }

.feature-description { color: var(--text-secondary); font-size: 0.9em; line-height: 1.5; margin-bottom: 15px; flex: 1; min-height: 50px; }

.feature-amounts { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.85em; padding: 10px; background: rgba(33, 150, 243, 0.05); border-radius: 4px; }
.amount-label { color: var(--text-secondary); }
.amount-value { font-family: var(--font-mono); font-weight: 600; color: var(--primary); margin-left: 4px; }

.progress-bar-wrapper { width: 100%; height: 8px; background: rgba(33, 150, 243, 0.1); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); transition: width var(--transition); border-radius: 4px; }

.progress-percent { text-align: right; font-size: 0.8em; color: var(--text-tertiary); margin-bottom: 12px; font-family: var(--font-mono); }

.feature-actions { display: flex; gap: 10px; margin-top: auto; }

.btn-donate-feature { flex: 1; padding: 10px; background: rgba(33, 150, 243, 0.1); border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-mono); font-weight: 600; font-size: 0.85em; cursor: pointer; border-radius: 4px; transition: all var(--transition); text-transform: uppercase; letter-spacing: 0.5px; }
.btn-donate-feature:hover:not(:disabled) { background: rgba(33, 150, 243, 0.2); box-shadow: inset 0 0 12px rgba(33, 150, 243, 0.2); transform: translateY(-2px); }
.btn-donate-feature:disabled { opacity: 0.5; cursor: not-allowed; }

.completed-badge { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; background: rgba(6, 255, 165, 0.15); border: 1px solid var(--success); border-radius: 20px; font-weight: 600; color: var(--success); font-size: 0.9em; width: 100%; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); z-index: 1000; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(5px); }
.modal.active { display: flex; }

.modal-content { background: var(--bg-secondary); border: 1px solid rgba(33, 150, 243, 0.3); border-radius: 8px; padding: 30px; max-width: 550px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-elevated); }

.modal-close { position: absolute; top: 15px; right: 15px; background: transparent; border: none; color: var(--text-secondary); font-size: 1.8em; cursor: pointer; transition: color var(--transition); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; line-height: 1; }
.modal-close:hover { color: var(--error); }

.modal-title { font-family: var(--font-mono); font-size: 1.5em; margin-bottom: 10px; font-weight: 700; color: var(--text-primary); }
.modal-description { color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; font-size: 0.95em; }

.modal-progress { margin-bottom: 25px; padding: 15px; background: rgba(33, 150, 243, 0.05); border: 1px solid rgba(33, 150, 243, 0.2); border-radius: 6px; }

.progress-info { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 12px; font-size: 0.9em; }
.progress-info span { color: var(--text-secondary); }
.progress-info strong { color: var(--primary); font-family: var(--font-mono); }

.remaining-amount { text-align: center; font-size: 1.1em; font-weight: 600; color: var(--warning); font-family: var(--font-mono); }

.donate-form { margin-bottom: 25px; }
.donate-form label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-primary); font-size: 0.9em; }

.amount-input-wrapper { display: flex; gap: 10px; margin-bottom: 15px; }
.amount-input-wrapper input { flex: 1; padding: 10px; background: rgba(33, 150, 243, 0.05); border: 1px solid rgba(33, 150, 243, 0.2); color: var(--text-primary); font-family: var(--font-mono); border-radius: 4px; font-size: 0.95em; transition: all var(--transition); }
.amount-input-wrapper input:focus { outline: none; border-color: var(--primary); background: rgba(33, 150, 243, 0.1); box-shadow: inset 0 0 12px rgba(33, 150, 243, 0.1); }

.btn-max { padding: 10px 16px; background: rgba(33, 150, 243, 0.15); border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-mono); font-weight: 600; cursor: pointer; border-radius: 4px; transition: all var(--transition); font-size: 0.85em; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-max:hover { background: rgba(33, 150, 243, 0.25); box-shadow: inset 0 0 12px rgba(33, 150, 243, 0.15); }

input[type='range'] { width: 100%; height: 6px; border-radius: 3px; background: rgba(33, 150, 243, 0.1); outline: none; margin-bottom: 8px; -webkit-appearance: none; appearance: none; }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: 0 0 8px rgba(33, 150, 243, 0.4); transition: all var(--transition); }
input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; border: none; box-shadow: 0 0 8px rgba(33, 150, 243, 0.4); transition: all var(--transition); }

.slider-labels { display: flex; justify-content: space-between; font-size: 0.85em; color: var(--text-tertiary); margin-bottom: 15px; font-family: var(--font-mono); }

.btn-donate { width: 100%; padding: 12px; background: var(--primary); border: none; color: #000; font-family: var(--font-mono); font-weight: 700; font-size: 0.95em; cursor: pointer; border-radius: 4px; transition: all var(--transition); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.btn-donate:hover:not(:disabled) { background: var(--primary-light); box-shadow: 0 0 20px rgba(33, 150, 243, 0.4); transform: translateY(-2px); }
.btn-donate:disabled { opacity: 0.5; cursor: not-allowed; }

.recent-donations { margin-top: 25px; padding-top: 25px; border-top: 1px solid rgba(33, 150, 243, 0.2); }
.recent-donations h3 { font-family: var(--font-mono); font-size: 1em; font-weight: 700; margin-bottom: 15px; color: var(--text-primary); }

#recentDonationsList { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; }

.donation-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: rgba(33, 150, 243, 0.05); border-radius: 4px; font-size: 0.9em; }
.donation-wallet { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.85em; }
.donation-amount { color: var(--success); font-family: var(--font-mono); font-weight: 600; }
.donation-empty { text-align: center; padding: 20px; color: var(--text-tertiary); font-size: 0.9em; }

.loading-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(5px); }

.loading-spinner { width: 48px; height: 48px; border: 3px solid rgba(33, 150, 243, 0.2); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 15px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { color: var(--text-secondary); font-size: 0.95em; font-family: var(--font-mono); }

.toast-container { position: fixed; bottom: 20px; right: 16px; z-index: 3000; pointer-events: none; max-width: 360px; display: flex; flex-direction: column; gap: 8px; }

.toast { background: var(--bg-secondary); border: 1px solid rgba(33, 150, 243, 0.3); color: var(--text-primary); padding: 10px 14px; border-radius: 6px; font-size: 0.9em; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); animation: slideIn 0.3s ease; pointer-events: auto; line-height: 1.4; max-width: 320px; word-break: break-word; }
.toast.success { border-color: rgba(6, 255, 165, 0.5); background: rgba(6, 255, 165, 0.1); color: var(--success); }
.toast.error { border-color: rgba(255, 71, 87, 0.5); background: rgba(255, 71, 87, 0.1); color: var(--error); }
.toast.warning { border-color: rgba(255, 201, 60, 0.5); background: rgba(255, 201, 60, 0.1); color: var(--warning); }

@keyframes slideIn { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; padding: 30px 10px; width: 100%; margin-top: 40px; }

.footer-main { grid-column: 2; display: flex; flex-direction: column; align-items: center; }

.footer-copyright { font-family: var(--font-mono); font-size: 0.9em; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
.footer-links a { display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--transition); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-links a i { font-size: 1.5em; }

@media (max-width: 768px) {
  header { flex-wrap: wrap; height: auto; padding: 12px 16px; }
  .header-left { order: 1; width: 100%; margin-bottom: 10px; }
  .header-center { order: 2; flex: none; width: 100%; }
  .header-center h1 { font-size: 1em; }
  .header-right { order: 3; width: 100%; gap: 10px; }
  .wallet-address { max-width: 100px; }
  .wallet-status { flex: 1; }
  .connect-wallet-btn { flex: 1; text-align: center; }
  main { margin-top: 0; padding: 20px; }
  .features-grid { grid-template-columns: 1fr; gap: 15px; }
  .intro-section { padding: 20px; }
  .intro-section h2 { font-size: 1.3em; }
  .modal-content { padding: 20px; margin: 0 10px; }
  footer { bottom: auto; padding: 20px 5px; margin-top: 30px; }
  .footer-main { display: flex; flex-direction: column; align-items: center; }
  .footer-copyright { font-size: 0.8em; }
  .footer-links { gap: 15px; margin-top: 8px; }
  .footer-links a i { font-size: 1.3em; }
}

@media (max-width: 480px) {
  :root { font-size: 13px; }
  main { padding: 12px; }
  #container { padding: 0; }
  .features-grid { gap: 12px; }
  .feature-card { padding: 15px; }
  .feature-title { font-size: 1em; }
  .modal-content { padding: 15px; max-width: 100%; }
  .modal-title { font-size: 1.2em; }
  .amount-input-wrapper { flex-direction: column; }
  .btn-max { width: 100%; }
  footer { padding: 15px 5px; margin-top: 20px; }
  .footer-copyright { font-size: 0.75em; }
  .footer-links { gap: 12px; margin-top: 6px; }
  .footer-links a i { font-size: 1.2em; }
}
