/* =========================
   GLOBAL BASE STYLES
   ========================= */
html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #f472b6, #60a5fa);
  background-attachment: fixed;
  color: #111;
  min-height: 100vh;
}

* {
  box-sizing: border-box;
}

/* =========================
   CONTAINER / CARD
   ========================= */
.container,
.admin-wrap {
  background: #fff;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  margin: 40px auto;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  text-align: left;
}

.admin-wrap {
  max-width: 950px;
}

/* =========================
   TYPOGRAPHY
   ========================= */
h2, h3 {
  text-align: center;
  color: #111;
  margin: 0 0 12px;
}

label {
  display: block;
  font-weight: 600;
  margin: 10px 0 5px;
}

p {
  line-height: 1.4;
}

.muted {
  color: #6b7280;
  font-size: 0.9rem;
}

/* =========================
   INPUTS & SELECTS
   ========================= */
input,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  color: #111;
  background-color: #fff;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Custom dropdown arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg fill='%236b7280' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

/* =========================
   BUTTONS
   ========================= */
button {
  display: block;
  width: 100%;
  background-color: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover {
  background-color: #1e40af;
}

button:active {
  transform: scale(0.98);
}

/* =========================
   TABLES (ADMIN PAGE)
   ========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 0.95rem;
}

th {
  background-color: #f9fafb;
  font-weight: 600;
}

.badge {
  background: #2563eb;
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.top-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 10px;
}

.top-list li {
  margin: 4px 0;
}

/* =========================
   MODAL
   ========================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 5px 25px rgba(0,0,0,0.2);
  animation: modalSlideUp .4s ease;
}

.debug-info {
  margin-top: 10px;
  font-size: 13px;
  color: #444;
  text-align: left;
  word-wrap: break-word;
}

.close-row {
  margin-top: 20px;
}

/* Animations */
@keyframes modalSlideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes modalSlideDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100px); opacity: 0; }
}

/* =========================
   SHARE ICONS
   ========================= */
.share-icons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

.share-btn {
  background: #f3f4f6;
  border-radius: 50%;
  padding: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.share-btn:hover {
  background: #e5e7eb;
}

.share-btn svg {
  fill: #111;
  width: 22px;
  height: 22px;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  text-align: center;
  font-size: 13px;
  padding: 20px;
  color: #111;
}

/* =========================
   RESPONSIVE MEDIA QUERIES
   ========================= */
@media (max-width: 768px) {
  .container,
  .admin-wrap {
    width: 94%;
    margin: 20px auto;
    padding: 18px;
  }

  h2 {
    font-size: 1.4rem;
  }

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .container,
  .admin-wrap {
    padding: 15px;
  }

  h2 {
    font-size: 1.2rem;
  }

  label {
    font-size: 0.9rem;
  }

  button {
    font-size: 15px;
    padding: 10px;
  }

  .modal-content {
    width: 92%;
    padding: 20px;
  }
}

/* =========================
   EXTRA SMALL (SAFARI FIXES)
   ========================= */
@supports (-webkit-touch-callout: none) {
  input, select, button {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
}
