/* Project ATLAS - Site #17: Generador de Contraseñas Seguras (Spanish) */
:root {
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #1e293b;
  --border-subtle: #334155;
  --border-focus: #10b981;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-green: #10b981;
  --accent-green-hover: #059669;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent-green);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav a:hover {
  color: var(--accent-green);
}

/* Tool Section */
.tool-section {
  padding: 3rem 0;
  background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}

/* Result Box */
.password-display-wrapper {
  background: #020617;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.password-display {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
  user-select: all;
  letter-spacing: 0.05em;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--border-subtle);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Strength Meter */
.strength-container {
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.strength-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.strength-bar-bg {
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--accent-green);
  transition: width 0.3s ease, background-color 0.3s ease;
}

/* Options / Configuration */
.options-body {
  padding: 2rem;
}

.tabs-header {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.75rem;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-btn.active {
  color: var(--accent-green);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-green);
}

/* Form Controls */
.slider-group {
  margin-bottom: 1.5rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.slider-val-badge {
  background: #020617;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-green);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-green);
  cursor: pointer;
  background: #1e293b;
  height: 6px;
  border-radius: 3px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.checkbox-label:hover {
  border-color: #475569;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-green);
  width: 1.15rem;
  height: 1.15rem;
  cursor: pointer;
}

.btn-generate {
  width: 100%;
  background: var(--accent-green);
  color: #020617;
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.btn-generate:hover {
  background: var(--accent-green-hover);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #020617;
  border: 1px solid var(--accent-green);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(1rem);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Editorial / Guides */
.editorial-section {
  padding: 4rem 0;
}

.editorial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
}

.editorial-card h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: #fff;
}

.editorial-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
}

.editorial-card p {
  color: #cbd5e1;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.badge-tag {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  background: #060911;
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent-green);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .password-display-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  .action-buttons {
    width: 100%;
    justify-content: flex-end;
  }
}
