/* Dawn of the Devs - Webring Styles */

:root {
  --color-bg: #0f1114;
  --color-bg-warm: #141012;
  --color-surface: #1a1618;
  --color-surface-hover: #241f21;
  --color-border: #2e2628;
  --color-border-subtle: #221c1e;
  --color-text: #e8e0e1;
  --color-text-muted: #9a8486;
  --color-primary: #ab271d;
  --color-primary-hover: #c93028;
  --color-accent: #d4443a;
  --color-success: #7bbf99;
  --color-warning: #d8b26a;
  --color-error: #e57373;
  --color-link: #d4443a;
  --color-link-hover: #e85850;
  --color-shadow: rgba(0, 0, 0, 0.55);
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --max-width: 54rem;
  --radius: 6px;
  --window-radius: 10px;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(1200px 800px at 15% 10%, rgba(171, 39, 29, 0.10), rgba(171, 39, 29, 0.03) 45%, transparent 70%),
    radial-gradient(1000px 700px at 85% 85%, rgba(212, 68, 58, 0.07), rgba(212, 68, 58, 0.02) 45%, transparent 70%),
    linear-gradient(180deg, #0f1114 0%, #0d0f12 50%, #0b0d10 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

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

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre code {
  background: none;
  padding: 0;
}

/* Code block with copy button */

.code-block {
  position: relative;
  display: flex;
}

.code-block pre {
  flex: 1;
  margin: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(0, 0, 0, 0.45);
  color: var(--color-text);
}

.copy-btn.copied {
  color: var(--color-success);
}

/* Page & Window */

.page {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 18px 48px;
  transition: max-width 0.3s ease, padding 0.3s ease;
}

.window {
  border: 1px solid var(--color-border);
  border-radius: var(--window-radius);
  background: linear-gradient(180deg, rgba(26, 22, 24, 0.96), rgba(20, 16, 18, 0.92));
  box-shadow: 0 18px 60px var(--color-shadow), 0 2px 0 var(--color-border-subtle);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 76px);
}


.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(30, 24, 26, 0.95), rgba(24, 20, 22, 0.95));
  flex-shrink: 0;
}

.window-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  padding: 0;
  cursor: default;
}

button.dot {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.dot-red { background: var(--color-error); }
.dot-yellow { background: var(--color-warning); }
.dot-green { background: var(--color-success); }

/* Maximized window state (green dot toggle) */

.page.maximized {
  max-width: 100%;
  padding: 0;
  transition: max-width 0.3s ease, padding 0.3s ease;
}

.page.maximized .window {
  border-radius: 0;
  border-left: none;
  border-right: none;
  min-height: 100vh;
}

.page.maximized .window-bar {
  border-radius: 0;
}

.page.maximized main {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page.maximized header nav {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page.maximized footer {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Desktop icons (shown when window is closed) */

.desktop-icons {
  display: none;
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 9999;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  max-height: calc(100vh - 48px);
}

.desktop-icon {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  text-decoration: none;
  color: inherit;
  user-select: none;
  -webkit-user-select: none;
}

.desktop-icon:hover {
  transform: scale(1.08);
  text-decoration: none;
  color: inherit;
}

.desktop-icon:hover .desktop-icon-img {
  filter: brightness(1.15);
  box-shadow: 0 8px 30px var(--color-shadow), 0 0 12px rgba(212, 68, 58, 0.15);
}

.desktop-icon:active {
  transform: scale(0.95);
}

.desktop-icon.dragging {
  position: fixed;
  z-index: 9997;
}

.desktop-icon-img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px var(--color-shadow);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

img.desktop-icon-img {
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.desktop-icon-img svg {
  width: 28px;
  height: 28px;
}

.desktop-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.3;
  max-width: 80px;
  word-wrap: break-word;
}

/* Closed window state (red dot → top-left) */

.page.closed {
  height: 0;
  overflow: hidden;
}

.page.closed .window {
  animation: window-close 0.5s ease-in forwards;
  pointer-events: none;
}

.page.closed .desktop-icons {
  display: flex;
}

.page.closed .desktop-icon {
  animation: icon-appear 0.3s 0.3s ease-out both;
}

@keyframes window-close {
  to {
    transform: scale(0.1);
    opacity: 0;
  }
}

@keyframes icon-appear {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Restoring from closed (icon click → from top-left) */

.page.restoring .window {
  animation: window-restore 0.4s ease-out forwards;
}

.page.restoring .desktop-icons {
  display: flex;
}

.page.restoring .desktop-icon {
  animation: icon-disappear 0.2s ease-in forwards;
}

@keyframes window-restore {
  from {
    transform: scale(0.1);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes icon-disappear {
  to {
    transform: scale(0.6);
    opacity: 0;
  }
}

/* Minimizing (yellow dot → dock at bottom center) */

.page.minimizing .window {
  transform-origin: bottom center;
  animation: window-minimize-to-dock 0.5s ease-in forwards;
}

.page.minimized {
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

@keyframes window-minimize-to-dock {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(0.05) translateY(40vh);
    opacity: 0;
  }
}

/* Expanding from minimized (dock click → from bottom center) */

.page.expanding .window {
  transform-origin: bottom center;
  animation: window-expand-from-dock 0.4s ease-out forwards;
}

@keyframes window-expand-from-dock {
  0% {
    transform: scale(0.05) translateY(40vh);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* macOS-style dock */

.mac-dock {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.window-minimized .mac-dock {
  display: block;
  opacity: 1;
}

.mac-dock-items {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(40, 36, 38, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.mac-dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.mac-dock-item:hover {
  transform: scale(1.35) translateY(-8px);
}

.mac-dock-item:active {
  transform: scale(1.2) translateY(-4px);
}

.mac-dock-icon-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.mac-dock-indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

@keyframes dock-icon-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-12px);
  }
  50% {
    transform: translateY(-6px);
  }
  70% {
    transform: translateY(-3px);
  }
}

.mac-dock-item.bouncing {
  animation: dock-icon-bounce 0.5s ease;
}

/* Dock link items (no underline) */

a.mac-dock-item {
  text-decoration: none;
  color: inherit;
}

a.mac-dock-item:hover {
  text-decoration: none;
  color: inherit;
}

/* Dock separator */

.mac-dock-separator {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
  align-self: center;
  flex-shrink: 0;
}

/* Dock icon (generic styled icon) */

.mac-dock-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.mac-dock-icon svg {
  width: 24px;
  height: 24px;
}

/* Icon variants */

.mac-dock-icon-site {
  background: linear-gradient(135deg, #d4443a, #ab271d);
}

.mac-dock-icon-linkedin {
  background: linear-gradient(135deg, #0A66C2, #004182);
  font-weight: 800;
  font-size: 20px;
  font-family: var(--font-mono);
}

.mac-dock-icon-github {
  background: linear-gradient(135deg, #333, #1a1a1a);
}

.mac-dock-icon-now {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.mac-dock-icon-info {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  font-style: italic;
  font-weight: 700;
  font-size: 24px;
  font-family: Georgia, "Times New Roman", serif;
}

/* Dock tooltip */

.mac-dock-item[title] {
  position: relative;
}

.mac-dock-item::before {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  padding: 4px 10px;
  background: rgba(30, 26, 28, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10001;
}

.mac-dock-item:hover::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Info window (draggable text editor) */

.info-window {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: calc(100vw - 32px);
  z-index: 10001;
  border: 1px solid var(--color-border);
  border-radius: var(--window-radius);
  background: linear-gradient(180deg, rgba(26, 22, 24, 0.98), rgba(20, 16, 18, 0.96));
  box-shadow: 0 18px 60px var(--color-shadow), 0 2px 0 var(--color-border-subtle);
  overflow: hidden;
  flex-direction: column;
}

.info-window.open {
  display: flex;
  animation: info-window-open 0.25s ease-out;
}

@keyframes info-window-open {
  from {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.info-window.dragging {
  animation: none;
}

.info-window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(30, 24, 26, 0.95), rgba(24, 20, 22, 0.95));
  cursor: grab;
  user-select: none;
}

.info-window-bar:active {
  cursor: grabbing;
}

.info-window-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.info-window-title {
  color: var(--color-text-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.info-window-body {
  padding: 1rem 1.25rem;
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  outline: none;
  caret-color: var(--color-text);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.info-window-body:focus {
  outline: none;
}

.window-title {
  color: var(--color-text-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  user-select: none;
}

/* Confirm window (external link prompt) */

.confirm-window {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  max-width: calc(100vw - 32px);
  z-index: 10002;
  border: 1px solid var(--color-border);
  border-radius: var(--window-radius);
  background: linear-gradient(180deg, rgba(26, 22, 24, 0.98), rgba(20, 16, 18, 0.96));
  box-shadow: 0 18px 60px var(--color-shadow), 0 2px 0 var(--color-border-subtle);
  overflow: hidden;
  flex-direction: column;
}

.confirm-window.open {
  display: flex;
  animation: confirm-window-open 0.25s ease-out;
}

@keyframes confirm-window-open {
  from {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.confirm-window.closing {
  display: flex;
  animation: confirm-window-close 0.2s ease-in forwards;
}

@keyframes confirm-window-close {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
}

.confirm-window.dragging {
  animation: none;
}

.confirm-window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(30, 24, 26, 0.95), rgba(24, 20, 22, 0.95));
  cursor: grab;
  user-select: none;
}

.confirm-window-bar:active {
  cursor: grabbing;
}

.confirm-window-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.confirm-window-title {
  color: var(--color-text-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.confirm-window-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}

.confirm-window-body p {
  margin: 0 0 1rem;
}

.confirm-window-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Header */

header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(22, 18, 20, 0.7);
  flex-shrink: 0;
}

header nav {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title:hover {
  color: var(--color-primary-hover);
  text-decoration: none;
}

.site-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-text);
  text-decoration: none;
}

/* Main */

main {
  padding: 2rem 1.5rem;
  width: 100%;
  flex: 1;
}

/* Footer */

footer {
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

footer a {
  color: var(--color-text-muted);
}

footer a:hover {
  color: var(--color-text);
}

/* Headings */

h1, h2, h3 {
  color: var(--color-text);
  line-height: 1.3;
}

h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

/* Flash messages */

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid;
}

.flash-success {
  background: rgba(74, 222, 128, 0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}

.flash-warning {
  background: rgba(251, 191, 36, 0.1);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.flash-error {
  background: rgba(248, 113, 113, 0.1);
  border-color: var(--color-error);
  color: var(--color-error);
}

/* Hero */

.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--color-text-muted);
  font-size: 1.15rem;
}

/* Open source banner */

.open-source-banner {
  margin-bottom: 2rem;
}

.open-source-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: var(--radius);
  background: rgba(74, 222, 128, 0.06);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.open-source-link:hover {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.1);
  text-decoration: none;
  color: var(--color-text);
}

.github-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--color-success);
}

.open-source-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.open-source-text strong {
  font-size: 0.95rem;
  color: var(--color-success);
}

.open-source-text span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.open-source-arrow {
  font-size: 1.25rem;
  color: var(--color-success);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.open-source-link:hover .open-source-arrow {
  transform: translateX(3px);
}

/* Sections */

section {
  margin-bottom: 2rem;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  text-decoration: none;
  color: var(--color-bg);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: rgba(192, 132, 252, 0.1);
  color: var(--color-primary-hover);
}

.btn-danger {
  background: transparent;
  border-color: var(--color-error);
  color: var(--color-error);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.1);
}

/* Sign-in form */

.sign-in-form {
  margin-top: 1rem;
}

.sign-in-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.url-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.3);
  color: var(--color-text);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

.url-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

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

/* Status badges */

.status-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 1em;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.active {
  background: rgba(74, 222, 128, 0.15);
  color: var(--color-success);
}

.status-badge.inactive {
  background: rgba(248, 113, 113, 0.15);
  color: var(--color-error);
}

/* Recent list */

.recent-list {
  list-style: none;
  padding: 0;
}

.recent-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.recent-list li:last-child {
  border-bottom: none;
}

.time-ago {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Action buttons */

.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.action-buttons form {
  display: inline;
}

/* Checks table */

.checks-table {
  width: 100%;
  border-collapse: collapse;
}

.checks-table th,
.checks-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.checks-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.check-ok {
  color: var(--color-success);
}

.check-error {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0;
}

.check-critical {
  color: var(--color-error);
}

.check-warning {
  color: var(--color-warning);
}

.severity-icon {
  font-size: 0.9rem;
}

/* Profile display */

.profile-display {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.profile-display .profile-photo {
  width: 64px;
  height: 64px;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-details p {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Directory grid */

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, background 0.15s;
}

.profile-card:hover {
  border-color: var(--color-primary);
  background: rgba(0, 0, 0, 0.35);
  text-decoration: none;
  color: var(--color-text);
}

.profile-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-border);
}

.profile-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(171, 39, 29, 0.15);
  border: 1px solid var(--color-border);
}

.placeholder-initial {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  line-height: 1;
}

.profile-info {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-name {
  font-size: 1.05rem;
  color: var(--color-text);
}

.profile-url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.profile-title {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.profile-note {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* FAQ / Terms */

.faq dt {
  font-weight: 700;
  margin-top: 1.5rem;
  color: var(--color-text);
}

.faq dt:first-child {
  margin-top: 0;
}

.faq dd {
  margin-left: 0;
  margin-top: 0.35rem;
  color: var(--color-text-muted);
}

.faq dd ol {
  padding-left: 1.25rem;
}

.faq dd ol li {
  margin-bottom: 0.35rem;
}

/* Site status section */

.site-status h2 a {
  color: var(--color-link);
}

/* Logout section */

.logout {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Status notices (dashboard) */

.status-notice {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: 1px solid;
}

.pending-notice {
  background: rgba(251, 191, 36, 0.1);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.denied-notice {
  background: rgba(248, 113, 113, 0.1);
  border-color: var(--color-error);
  color: var(--color-error);
}

.banned-notice {
  background: rgba(248, 113, 113, 0.15);
  border-color: var(--color-error);
  color: var(--color-error);
}

/* Admin styles */

.admin-stats {
  margin-bottom: 1.5rem;
}

/* Webring Configuration */

.config-form {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.config-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.config-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.config-group h3 {
  margin: 0 0 1rem 0;
  color: var(--color-text);
  font-size: 1.1rem;
}

.config-description {
  margin: 0 0 1rem 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-row {
  margin-bottom: 0.75rem;
}

.html-input {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.3);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
}

.html-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Google Analytics Section */

.google-analytics {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 1em;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.stat-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
  text-decoration: none;
}

.stat-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-bg);
}

.stat-count {
  font-weight: 700;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.admin-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
  min-height: 100%;
}

.inline-form {
  display: inline;
}

.btn-small {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
}

.btn-approve {
  background: transparent;
  border-color: var(--color-success);
  color: var(--color-success);
}

.btn-approve:hover {
  background: rgba(74, 222, 128, 0.15);
  color: var(--color-success);
}

.btn-deny {
  background: transparent;
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.btn-deny:hover {
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-warning);
}

.btn-ban {
  background: transparent;
  border-color: var(--color-error);
  color: var(--color-error);
}

.btn-ban:hover {
  background: rgba(248, 113, 113, 0.15);
  color: var(--color-error);
}

/* Hits display */

.hits-cell { white-space: nowrap; }
.hits-total { font-weight: 700; font-size: 1rem; color: var(--color-text); }
.hits-breakdown { display: flex; gap: 0.5rem; margin-top: 0.2rem; font-size: 0.7rem; color: var(--color-text-muted); }
.hits-breakdown span { display: inline-flex; align-items: center; gap: 0.15rem; }

/* Moderation status badges */

.status-badge.mod-pending {
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-warning);
}

.status-badge.mod-approved {
  background: rgba(74, 222, 128, 0.15);
  color: var(--color-success);
}

.status-badge.mod-denied {
  background: rgba(248, 113, 113, 0.15);
  color: var(--color-error);
}

.status-badge.mod-banned {
  background: rgba(220, 38, 38, 0.2);
  color: #ef4444;
}

/* Error page */

.error-page {
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

.error-page p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Desktop icon placeholder (prevents jumping on drag) */

.desktop-icon-placeholder {
  pointer-events: none;
  visibility: hidden;
  flex-shrink: 0;
}

/* Context menu */

.context-menu {
  display: none;
  position: fixed;
  z-index: 20000;
  min-width: 160px;
  padding: 4px 0;
  background: rgba(40, 36, 38, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.context-menu.open {
  display: block;
}

.context-menu-item {
  display: block;
  width: 100%;
  padding: 6px 14px;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  outline: none;
}

.context-menu-item:hover {
  background: rgba(171, 39, 29, 0.3);
}

/* Trash desktop icon */

.trash-icon {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
}

.page.closed .trash-icon {
  display: block;
  animation: icon-appear 0.3s 0.3s ease-out both;
}

.page.restoring .trash-icon {
  display: block;
  animation: icon-disappear 0.2s ease-in forwards;
}

.trash-icon-img {
  background: linear-gradient(135deg, #6b7280, #4b5563);
}

.trash-icon.has-items .trash-icon-img {
  background: linear-gradient(135deg, #d4443a, #ab271d);
}

.trash-icon.drag-over .desktop-icon-img {
  transform: scale(1.15);
  filter: brightness(1.3);
}

/* Dock trash */

.trash-dock-icon {
  background: linear-gradient(135deg, #6b7280, #4b5563);
}

.mac-dock-trash.has-items .trash-dock-icon {
  background: linear-gradient(135deg, #d4443a, #ab271d);
}

.mac-dock-trash.drag-over .mac-dock-icon {
  transform: scale(1.15);
  filter: brightness(1.3);
}

/* Trash window */

.trash-window {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 400px;
  z-index: 10001;
  border: 1px solid var(--color-border);
  border-radius: var(--window-radius);
  background: linear-gradient(180deg, rgba(26, 22, 24, 0.98), rgba(20, 16, 18, 0.96));
  box-shadow: 0 18px 60px var(--color-shadow), 0 2px 0 var(--color-border-subtle);
  overflow: hidden;
  flex-direction: column;
}

.trash-window.open {
  display: flex;
  animation: trash-window-open 0.25s ease-out;
}

@keyframes trash-window-open {
  from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.trash-window.dragging {
  animation: none;
}

.trash-window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(30, 24, 26, 0.95), rgba(24, 20, 22, 0.95));
  cursor: grab;
  user-select: none;
}

.trash-window-bar:active { cursor: grabbing; }

.trash-window-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.trash-window-title {
  color: var(--color-text-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.trash-window-body {
  padding: 0.75rem;
  overflow-y: auto;
  max-height: 320px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  align-content: flex-start;
}

.trash-empty-message {
  color: var(--color-text-muted);
  text-align: center;
  padding: 1rem 0;
  margin: 0;
  width: 100%;
}

.trash-window-icon {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding: 4px;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.trash-window-icon:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Poof animation (when trashing) */

@keyframes poof {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.5; }
  100% { transform: scale(0); opacity: 0; }
}

.desktop-icon.poofing,
.mac-dock-item.poofing {
  animation: poof 0.3s ease-out forwards !important;
  pointer-events: none;
}

/* Navigation stats (dashboard) */

.nav-stats { text-align: center; }
.hits-total-large { font-size: 2.5rem; font-weight: 700; margin: 0.5rem 0 0; color: var(--color-text); }
.nav-stats-label { color: var(--color-text-muted); font-size: 0.85rem; margin: 0 0 0.75rem; }
.hits-breakdown-large { display: flex; justify-content: center; gap: 1.25rem; font-size: 0.9rem; color: var(--color-text-muted); }
.hits-breakdown-large span { display: inline-flex; align-items: center; gap: 0.25rem; }

/* Responsive */

@media (max-width: 600px) {
  .page {
    padding: 12px 8px 24px;
  }

  .window {
    min-height: calc(100vh - 36px);
    border-radius: 8px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .input-group {
    flex-direction: column;
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    text-align: center;
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3),
  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4),
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) {
    display: none;
  }

  .stat-pills {
    flex-wrap: wrap;
  }

  .html-input {
    min-height: 150px;
    padding: 0.75rem;
  }

  /* Hide trashcan on mobile */
  .trash-icon,
  .mac-dock-trash {
    display: none !important;
  }

  /* Hide nownownow.com link on mobile */
  .desktop-icon[href*="nownownow.com"],
  .mac-dock-item[href*="nownownow.com"] {
    display: none !important;
  }

  /* Ensure dock remains interactive on mobile */
  .mac-dock {
    pointer-events: auto;
  }

  .mac-dock-item {
    pointer-events: auto;
    touch-action: none;
  }
}
