:root {
  --bg: #08080a;
  --bg-elevated: #121216;
  --bg-card: #0e0e12;
  --bg-input: #0a0a0e;
  --border: #2a2520;
  --border-gold: #00aa00;
  --text: #f5f5f0;
  --text-muted: #9a9a8e;
  /* §a / §2 — verde Savage */
  --gold: #55ff55;
  --gold-bright: #55ff55;
  --gold-dim: #00aa00;
  --success: #22c55e;
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Rajdhani', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(85, 255, 85, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(0, 170, 0, 0.06), transparent),
    radial-gradient(ellipse 40% 40% at 0% 80%, rgba(0, 170, 0, 0.05), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Navbar */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 170, 0, 0.22);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-logo:hover {
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(85, 255, 85, 0.35);
}

.nav-icon {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-logo:hover .nav-icon {
  transform: scale(1.1);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-theme {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-theme:hover {
  border-color: var(--gold-dim);
  transform: scale(1.05);
}

.nav-link:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(0, 170, 0, 0.08);
  box-shadow: 0 0 12px rgba(85, 255, 85, 0.12);
}

/* Page */
.page {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2.5rem;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
  margin-bottom: 2rem;
  text-align: center;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(85, 255, 85, 0.25));
}

.logo::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
}

/* Main content card */
.main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: rgba(14, 14, 18, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 170, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Textarea */
#paste-content {
  width: 100%;
  min-height: 380px;
  padding: 1.25rem 1.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
}

#paste-content:focus {
  border-color: var(--gold-dim);
  border-left-color: var(--gold);
  box-shadow: 
    0 0 0 1px rgba(0, 170, 0, 0.25),
    0 0 24px rgba(85, 255, 85, 0.08);
}

#paste-content::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Stats */
.stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stats span {
  opacity: 0.9;
}

.stats-read {
  margin-left: auto;
}

/* Fullscreen */
.main.fullscreen {
  margin: 0;
  max-width: none;
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
  padding: 2rem;
}

.main.fullscreen #paste-content {
  min-height: calc(100vh - 220px);
  flex: 1;
}

/* Modal QR Code */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

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

.modal-content h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.modal-content img {
  display: block;
  border-radius: 8px;
}

/* Tema claro */
body.theme-light {
  --bg: #f5f5f0;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #fafaf8;
  --border: #e5e5e0;
  --text: #1a1a18;
  --text-muted: #6b6b65;
}

body.theme-light::before {
  background: 
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(85, 255, 85, 0.12), transparent 50%);
}

body.theme-light .nav {
  background: rgba(245, 245, 240, 0.95);
  border-bottom-color: rgba(0, 170, 0, 0.2);
}

body.theme-light .logo {
  filter: none;
}

/* Actions */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.select-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.select-label span {
  white-space: nowrap;
}

.select-label select {
  padding: 0.35rem 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.select-label select:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.actions-left {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  background: var(--bg-elevated);
  color: var(--text);
  transition: all 0.2s ease;
}

.btn:hover {
  border-color: var(--gold-dim);
  background: rgba(0, 170, 0, 0.08);
  box-shadow: 0 0 12px rgba(85, 255, 85, 0.12);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  color: #0a0a0c;
  border: 1px solid var(--gold);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-color: var(--gold-bright);
  box-shadow: 0 0 20px rgba(85, 255, 85, 0.35);
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.btn-icon {
  font-size: 1.05rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

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

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* URL display */
.url-display {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.url-display input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold-dim);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
}

/* Footer */
.footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.footer-link {
  margin-top: 0.5rem;
}

.footer-link a {
  color: var(--gold-dim);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-link a:hover {
  color: var(--gold-bright);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 0.65rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.2);
}

@media (max-width: 600px) {
  .nav {
    padding: 0.7rem 1rem;
  }

  .nav-logo {
    font-size: 1.15rem;
  }

  .page {
    padding: 1.5rem 1rem;
  }

  .main {
    padding: 1.25rem;
  }

  .header {
    margin-bottom: 1.5rem;
  }

  .logo {
    font-size: 1.4rem;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-left {
    justify-content: flex-start;
  }
}
