:root,
[data-theme="default"],
[data-theme="dark"] {
  --bg: #000;
  --bg-secondary: #0d0d0d;
  --text: #fff;
  --text-muted: #888;
  --border: #333;
  --font: ui-monospace, Menlo, Monaco, "Courier New", monospace;
  --bitcoin-orange: #f7931a;
}

/* Light Mode Theme */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --text: #1a1a1a;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bitcoin-orange: #f7931a;
  --accent: #0066cc;
}

[data-theme="work"] {
  --bg: #0a0a0a;
  --bg-secondary: #111;
  --text: #e5e5e5;
  --text-muted: #777;
  --border: #2a2a2a;
}

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

html,
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body * {
  font-family: inherit;
}

/* Sanfte Übergänge bei Theme-Wechsel */
body,
.main,
.block,
.tile,
.footer,
.btn,
.link {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 32px;
}

.terminal-prompt {
  margin: 0 0 32px;
  font-size: 14px;
  color: var(--text-muted);
}

.terminal-prompt a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.terminal-prompt a:hover {
  color: var(--text);
}

.cursor {
  color: var(--text);
  animation: blink 1s step-end infinite;
}

[data-theme="light"] .terminal-prompt {
  color: var(--text-muted);
}

[data-theme="light"] .cursor {
  color: var(--accent);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.block {
  margin-top: 32px;
}

.block:first-of-type {
  margin-top: 0;
}

.block-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.block-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

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

.link:hover {
  color: var(--text);
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  margin-right: 8px;
  margin-top: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.btn:hover {
  border-color: rgba(247, 147, 26, 0.4);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tile {
  position: relative;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-muted);
  overflow: hidden;

  /* gleiche Kastenhöhe für alle Tiles (Desktop & Mobil) */
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(247, 147, 26, 0.12),
    transparent
  );
  transition: left 0.4s ease;
}

.tile:hover::after {
  left: 100%;
}

.tile:hover {
  border-color: rgba(247, 147, 26, 0.4);
}

.tile-title {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.tile-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.tile-link {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
}

.tile-link:hover {
  color: var(--text);
}

.tile-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tile-value {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}

.tile--price-reveal .tile-value {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tile--price-reveal:hover .tile-value {
  opacity: 1;
}

.tile .tile-desc {
  margin-top: 2px;
}

.footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 24px;
  border-top: 1px solid var(--border);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.footer-col {
  flex: 1 1 160px;
}

.footer-col--center {
  text-align: center;
}

.footer-col--right {
  text-align: right;
}

.footer-nav-links .footer-copy + .footer-copy {
  margin-top: 2px;
}

.footer-copy {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-copy + .footer-copy,
.footer-details + .footer-copy {
  margin-top: 4px;
}

.footer-details {
  margin: 0;
}

.footer-details summary {
  cursor: pointer;
  list-style: none;
}

.footer-details summary::-webkit-details-marker {
  display: none;
}

.footer-dropdown-links {
  margin-top: 4px;
  margin-left: 12px;
}

.payment-detail {
  display: none;
  margin-top: 4px;
}

.copy-feedback {
  margin-left: 2px;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.copy-feedback.is-visible {
  opacity: 1;
}

.back-to-top {
  color: var(--text-muted);
  text-decoration: none;
}

.back-to-top:hover {
  color: var(--text);
}

.price-value {
  font-size: 20px;
  font-weight: 600;
  margin: 4px 0 8px;
  color: var(--text);
}

/* Theme Switcher */
.theme-switcher {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
}

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
  border-color: var(--bitcoin-orange);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Icons im Button */
.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

/* Optional: freundlichere Fonts im Light Mode */
[data-theme="light"] body,
[data-theme="light"] body * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="light"] .terminal-prompt {
  font-family: ui-monospace, Menlo, Monaco, "Courier New", monospace;
}

/* Optional: mehr Farbe bei Kacheln im Light Mode */
[data-theme="light"] .tile:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

[data-theme="light"] .tile::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 102, 204, 0.08),
    transparent
  );
}

@media (max-width: 600px) {
  .tiles {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 24px 24px 16px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 4px;
  }

  .footer-col,
  .footer-col--center,
  .footer-col--right {
    flex: 0 0 auto;
    text-align: left;
  }

  .footer-copy + .footer-copy,
  .footer-details + .footer-copy {
    margin-top: 2px;
  }
}

/* Mobile Anpassung Theme Switcher */
@media (max-width: 640px) {
  .theme-switcher {
    top: 16px;
    right: 16px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

