:root {
  /* Christmassy palette: deep reds & evergreens with warm text */
  --bg-main: radial-gradient(circle at top, #5b1111, #120505 60%);
  --bg-logs: linear-gradient(135deg, #3b0b0b, #071b10);
  --card-bg: linear-gradient(135deg, #4a1515, #200808);
  --accent-red: #e53935;
  --accent-green: #2e7d32;
  --accent-gold: #ffeb3b;
  --text-main: #fff8f0;
  --text-muted: #d7c9c9;
  --border-subtle: rgba(255, 255, 255, 0.1);
}

/* ===== General ===== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
}

/* ===== Main page layout ===== */

.page-main {
  background: var(--bg-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  text-align: center;
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
}

.card {
  position: relative;
  background: var(--card-bg);
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

h1 {
  margin-top: 0.5rem;
  margin-bottom: 1.2rem;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

/* ===== Main button ===== */

.big-button {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 1.5rem;
  color: #fffdf7;
  background:
    radial-gradient(circle at 30% 20%, #ff8a80, var(--accent-red));
  box-shadow: 0 18px 35px rgba(229, 57, 53, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem auto;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease,
    filter 0.15s ease,
    border-color 0.15s ease;
}

.big-button:active {
  transform: translateY(3px) scale(0.97);
  box-shadow: 0 10px 22px rgba(229, 57, 53, 0.55);
  filter: brightness(0.95);
  border-color: rgba(255, 255, 255, 0.25);
}

.big-button-disabled {
  opacity: 0.85;
  filter: grayscale(0.1) brightness(0.92);
}

/* ===== Secondary controls ===== */

.secondary-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.secondary-button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  backdrop-filter: blur(6px);
}

.secondary-button:active {
  transform: translateY(1px);
  background: rgba(0, 0, 0, 0.4);
}

/* ===== Status & hint ===== */

.status {
  min-height: 1.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status.ok {
  color: #a5d6a7;
}

.status.error {
  color: #ef9a9a;
}

.hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* ===== Logs page ===== */

.page-logs {
  background: var(--bg-logs);
  min-height: 100vh;
  padding: 1rem;
  color: var(--text-main);
}

.logs-container {
  max-width: 960px;
  margin: 0 auto;
}

.logs-container h1 {
  font-size: 1.5rem;
  margin: 0.5rem 0 0.3rem 0;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.nav {
  margin-bottom: 0.8rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  background: rgba(31, 31, 31, 0.55);
  color: var(--text-main);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
  background: rgba(31, 31, 31, 0.75);
}

/* Table styling */

.table-wrapper {
  margin-top: 0.8rem;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th,
td {
  padding: 0.4rem 0.35rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  word-break: break-word;
}

th {
  background: rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.coords {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.ua {
  max-width: 260px;
}

.map-link {
  color: #ffcc80;
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

.empty {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Responsive tweaks ===== */

@media (max-width: 480px) {
  .card {
    padding: 1.5rem 1.2rem;
  }

  .big-button {
    width: 190px;
    height: 190px;
    font-size: 1.15rem;
  }

  th,
  td {
    font-size: 0.78rem;
  }
}
