:root {
  color-scheme: light dark;
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #2563eb;
  --border: #e2e2e2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --card: #212226;
    --text: #f0f0f0;
    --muted: #9a9a9a;
    --accent: #5b8def;
    --border: #34353a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.page {
  width: 100%;
  max-width: 720px;
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin: 1rem auto;
}
.card.wide {
  max-width: 100%;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
h1 {
  font-size: 1.25rem;
  margin: 0;
}
form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
input {
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}
button {
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: default; }
.result {
  margin-top: 1.25rem;
  padding: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: none;
  word-break: break-all;
}
.result.visible { display: block; }
.result a { color: var(--accent); }
.error {
  margin-top: 0.75rem;
  color: #dc2626;
  font-size: 0.9rem;
  display: none;
}
.error.visible { display: block; }
.hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: -0.25rem;
}
.copy-btn {
  margin-top: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
}
.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
}
td.url-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td.url-cell a {
  color: var(--text);
}
.delete-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: #dc2626;
  font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
}
.actions-cell {
  display: flex;
  gap: 0.4rem;
  white-space: nowrap;
}
.empty-hint {
  color: var(--muted);
  font-size: 0.9rem;
}
