/* All The Shauns - styles */
:root {
  --bg: #0f0f12;
  --surface: #1a1a20;
  --border: #2a2a32;
  --text: #e8e6e3;
  --muted: #888;
  --accent: #c9a227;
  --accent-hover: #e0b83d;
  --error: #c75c5c;
  --success: #5c9e5c;
  --font: 'DM Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
}
.logo:hover {
  color: var(--accent);
  text-decoration: none;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-header nav .user {
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero {
  text-align: center;
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.hero h1 {
  font-size: 2.25rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.tagline {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
}
.hero .btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  margin: 0 0.25rem;
}
.hero .btn:hover {
  background: var(--accent-hover);
  color: var(--bg);
  text-decoration: none;
}
.hero .btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.hero .btn.secondary:hover {
  background: rgba(201, 162, 39, 0.15);
  text-decoration: none;
}

.globe-section {
  margin-bottom: 2.5rem;
}
.globe-section h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 600;
}
.globe-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  min-height: 420px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: grab;
}
.globe-container:active {
  cursor: grabbing;
}
#globe-canvas {
  display: block;
  width: 100%;
  height: auto;
}
.globe-empty {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.sites h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 600;
}
.site-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.site-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.site-card:hover {
  border-color: var(--accent);
}
.site-link {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: inherit;
  text-decoration: none;
}
.site-link:hover {
  color: inherit;
  text-decoration: none;
}
.site-favicon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--border);
  object-fit: cover;
}
.site-info {
  flex: 1;
  min-width: 0;
}
.site-title {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.site-desc {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}
.site-url {
  font-size: 0.85rem;
  color: var(--accent);
}
.empty {
  color: var(--muted);
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.page h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}
.muted.small {
  font-size: 0.875rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}
.muted {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.url-with-fetch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.url-with-fetch input {
  flex: 1;
  min-width: 0;
  max-width: none;
}
.form .fetch-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.form .fetch-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(201, 162, 39, 0.08);
}
.form .fetch-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.form .fetch-btn.fetching .fetch-icon {
  animation: fetch-spin 0.8s linear infinite;
}
@keyframes fetch-spin {
  to { transform: rotate(360deg); }
}

.form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}
.form input,
.form textarea {
  display: block;
  width: 100%;
  max-width: 400px;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form button {
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.form button:hover {
  background: var(--accent-hover);
}
.error {
  color: var(--error);
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}
.success {
  color: var(--success);
  margin-bottom: 1rem;
}
.page p:last-of-type {
  margin-top: 1.5rem;
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .site-link {
    flex-direction: column;
    align-items: flex-start;
  }
}
