/* Global styles */
:root {
  --bg: #0b1120;
  --surface: #111a36;
  --surface-alt: #16224b;
  --text: #f6f7ff;
  --accent: #00d1b2;
  --muted: #9aa7c7;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, rgba(0,209,178,0.16), transparent 30%),
    linear-gradient(180deg, #070a14 0%, #080f1f 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

header {
  padding: 1.5rem 0 0.5rem;
}

.brand {
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - 4rem);
  padding-bottom: 2rem;
}

.hero-copy {
  max-width: 38rem;
}

.small-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,209,178,0.12);
  color: var(--accent);
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 0.95;
  margin: 0;
}

p.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin: 1.6rem 0 2rem;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.8rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #00d1b2, #24c8ff);
  color: #010409;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.25s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 60px rgba(0,209,178,0.18);
}

.hero-image {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 32px;
  padding: 2rem;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.card {
  background: rgba(16,26,50,0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}

.info-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.info-grid div {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 1.2rem;
  border-radius: 18px;
}

.info-grid strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
}

footer {
  text-align: center;
  padding: 2rem 0 3rem;
  color: var(--muted);
}

.support-text {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 1.35rem;
  margin-top: 1.5rem;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
}

.badge-grid span {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(0,209,178,0.12);
  border: 1px solid rgba(0,209,178,0.16);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.micro-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.9rem;
}

.trust-strip {
  display: inline-flex;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  margin-bottom: 1.2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-grid div {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 1rem 1.1rem;
}

.stat-grid strong {
  display: block;
  font-size: 1.5rem;
  color: var(--text);
}

.stat-grid span {
  color: var(--muted);
  margin-top: 0.35rem;
  display: block;
}

.live-counter {
  margin: 1rem 0 0.5rem;
  color: var(--text);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.live-counter span {
  color: #00d1b2;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.live-counter span.updated {
  transform: scale(1.08);
}

.form-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,12,28,0.75);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.form-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-panel {
  width: min(700px, calc(100% - 2rem));
  background: #0f1a36;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 2rem;
  position: relative;
  transform: translateY(-18px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease, border-color 0.25s ease;
}

.form-modal.open .modal-panel {
  transform: translateY(0);
  opacity: 1;
}

.modal-panel h2 {
  margin: 0 0 0.5rem;
}

.modal-panel p {
  color: var(--muted);
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
input[type='date'],
select {
  width: 100%;
  padding: 1rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='tel']:focus,
input[type='date']:focus,
select:focus {
  border-color: rgba(0,209,178,0.85);
  background: rgba(0,209,178,0.08);
  box-shadow: 0 0 0 4px rgba(0,209,178,0.08);
}

select {
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 1rem) calc(50% - 0.15em), calc(100% - 0.75rem) calc(50% - 0.15em);
  background-size: 0.45em 0.45em, 0.45em 0.45em;
  background-repeat: no-repeat;
}

select option {
  background: #0f1a36;
  color: var(--text);
}

input[type='date'] {
  color: var(--text);
}

input[type='date']::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: brightness(0) invert(1);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

input[type='date']:hover::-webkit-calendar-picker-indicator,
input[type='date']:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
}

input[type='date']::-webkit-inner-spin-button,
input[type='date']::-webkit-outer-spin-button {
  display: none;
}

input::placeholder,
select option {
  color: rgba(255,255,255,0.75);
}

.button-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.45);
  border-top-color: rgba(255,255,255,0.98);
  border-radius: 50%;
  margin-left: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.spinner-active {
  opacity: 1;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
}

.secondary-btn {
  border: 1px solid rgba(255,255,255,0.16);
  background: transparent;
  color: var(--text);
  padding: 0.95rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.secondary-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.28);
}

.error-message,
.success-message {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
}

.error-message { background: rgba(255,107,107,0.14); border: 1px solid rgba(255,107,107,0.22); }
.success-message { background: rgba(0,209,178,0.14); border: 1px solid rgba(0,209,178,0.22); }

.close-modal {
  position: absolute;
  right: 1.3rem;
  top: 1.3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    gap: 1.5rem;
  }
  .modal-actions {
    flex-direction: column;
  }
}

/* Popup styles */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.959);
  z-index: 1000;
  
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: var(--surface);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.popup-content h2 {
  margin-bottom: 1rem;
}

#close-popup {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#close-popup:hover {
  opacity: 0.9;
}
.admin-page .card {
  max-width: 100%;
}

.login-page .card {
  width: min(420px, calc(100% - 2rem));
  padding: 2rem;
}

.login-page input,
.login-page button {
  width: 100%;
}

.admin-page .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-page .copy-btn,
.admin-page .download-btn,
.admin-page .signout-btn {
  min-width: 170px;
}

.admin-page .table-wrapper {
  overflow-x: auto;
}

.admin-page table {
  width: 100%;
}

.admin-page th,
.admin-page td {
  padding: 0.95rem 0.85rem;
}

.admin-page .card-header {
  gap: 1rem;
}