:root {
  --bg: #0f0f0f;
  --card: #1a1a1a;
  --border: #2a2a2a;
  --text: #ffffff;
  --text-secondary: #9a9a9a;
  --accent: #4fd1c5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

/* Utilidad para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1.5rem 0.5rem;
  background: #0f0f0f;
  border-bottom: 1px solid var(--border);
}

.logo {
  height: auto;
  max-height: 120px;
  max-width: 90%;
  object-fit: contain;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.container {
  padding: 1.5rem 1.2rem 5.5rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Screens */
.screen {
  display: none;
}

.screen:target,
.screen.active {
  display: block;
}

/* Tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.tool-card {
  display: block;
  background: var(--card);
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s, border-color 0.2s;
}

.tool-card:active {
  transform: scale(0.98);
  border-color: var(--accent);
}

.tool-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
}

.tool-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Screen header */
.screen-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 1rem;
  width: auto;
  margin: 0;
  cursor: pointer;
  min-height: 44px;
}

.back-btn:hover {
  background: #2a2a2a;
}

.screen-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

/* Inputs */
.input-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.optional {
  color: #666;
  font-size: 0.8rem;
}

input {
  width: 100%;
  padding: 0.9rem 1rem;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: white;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  border: none;
  border-radius: 40px;
  margin-top: 0.5rem;
  color: #0f0f0f;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: opacity 0.2s;
  min-height: 48px;
}

button:active {
  opacity: 0.8;
}

/* Result cards */
.result-card {
  margin-top: 1.5rem;
  padding: 1.2rem;
  background: #111;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.result-header span {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--accent);
}

.copy-btn {
  width: auto;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  background: #2a2a2a;
  color: white;
  border-radius: 30px;
}

.zones .zone {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}

.zones .zone:last-child {
  border-bottom: none;
}

.hidden {
  display: none !important;
}

.desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  padding: 0.3rem 0;
  z-index: 100;
}

.nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.2rem;
  color: #aaa;
  text-decoration: none;
  font-size: 1.4rem;
  line-height: 1;
  transition: color 0.2s;
  min-height: 60px;
}

.nav-link span {
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

.nav-link.active-nav {
  color: var(--accent);
}

/* Animaciones */
@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

.screen:target,
.screen.active {
  animation: fadeSlide 0.2s ease-out;
}

.pop {
  animation: pop 0.2s ease;
}

@keyframes pop {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (min-width: 600px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}