/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* ========== CSS VARIABLES ========== */
:root {
  --color-bg: #07070c;
  --color-card: #101018;
  --color-surface: #161624;
  --color-border: rgba(0, 212, 255, 0.12);
  --color-border-hover: rgba(0, 212, 255, 0.25);
  --color-primary: #00d4ff;
  --color-primary-glow: rgba(0, 212, 255, 0.15);
  --color-text: #e8eaf0;
  --color-text-muted: rgba(200, 210, 230, 0.55);
  --color-text-dim: rgba(150, 170, 200, 0.4);
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ========== LAYOUT ========== */
.app-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-lg) var(--space-md);
}

.app-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

/* ========== CARD ========== */
.main-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
}

@media (max-width: 576px) {
  .main-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
  }
  .app-wrapper {
    padding: var(--space-md) var(--space-sm);
  }
}

/* ========== HERO ========== */
.hero {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  animation: iconPulse 3s ease-in-out infinite;
}

.hero-icon i {
  font-size: 2rem;
  color: var(--color-primary);
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--space-xs);
  letter-spacing: -0.5px;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--color-text-muted);
  margin: 0;
  font-weight: 300;
}

/* ========== PASSWORD OUTPUT ========== */
.password-section {
  margin-bottom: var(--space-xl);
}

.password-box {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color 0.3s ease;
}

.password-box:hover {
  border-color: var(--color-border-hover);
}

.password-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--color-primary);
  flex: 1;
  min-width: 0;
  word-break: break-all;
  line-height: 1.4;
}

.password-reveal {
  animation: revealPassword 0.35s ease-out;
}

@keyframes revealPassword {
  0%   { opacity: 0.3; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-copy:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--color-border-hover);
  transform: translateY(-1px);
}

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

.btn-copy-success {
  background: rgba(0, 230, 118, 0.12) !important;
  border-color: rgba(0, 230, 118, 0.4) !important;
  color: #00e676 !important;
}

/* ========== FORM SECTIONS ========== */
.form-section {
  margin-bottom: var(--space-xl);
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.section-label i {
  color: var(--color-primary);
  font-size: 1rem;
}

/* ========== LENGTH SLIDER ========== */
.length-control {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.length-slider-wrap {
  flex: 1;
  min-width: 0;
}

.form-range {
  width: 100%;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border: 3px solid var(--color-card);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
  cursor: pointer;
  margin-top: -9px;
  transition: transform 0.15s ease;
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.form-range::-webkit-slider-runnable-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
}

.form-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border: 3px solid var(--color-card);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.form-range::-moz-range-thumb:hover {
  transform: scale(1.15);
}

.form-range::-moz-range-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
}

.length-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: var(--space-xs) var(--space-sm);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ========== DIVIDER ========== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: var(--space-xl) 0;
}

/* ========== TOGGLE GRID ========== */
.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 576px) {
  .toggle-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.toggle-row:hover {
  border-color: var(--color-border);
}

.toggle-row.active {
  border-color: var(--color-border-hover);
  background: rgba(0, 212, 255, 0.04);
}

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.toggle-label {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.3;
}

.toggle-input-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ========== SWITCHES ========== */
.form-check-input {
  width: 52px;
  height: 28px;
  margin: 0;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  transition: all 0.25s ease;
}

.form-check-input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transition: all 0.25s ease;
}

.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.25);
}

.form-check-input:checked::after {
  left: 26px;
  background: #fff;
}

.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

/* ========== SPECIAL INPUT ========== */
.special-input {
  width: 64px;
  padding: var(--space-xs);
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.special-input::-webkit-outer-spin-button,
.special-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.special-input:focus {
  outline: none;
  border-color: var(--color-border-hover);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* ========== GENERATE BUTTON ========== */
.btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, #00b8d4, #0077ff);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 180, 255, 0.2);
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 180, 255, 0.35);
}

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

.btn-generate i {
  font-size: 1.1rem;
}

/* ========== STRENGTH METER ========== */
.strength-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.strength-label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-dim);
  margin: 0;
}

.strength-label i {
  color: rgba(0, 212, 255, 0.4);
}

.strength-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.strength-bars {
  display: flex;
  gap: 6px;
}

.strength-segment {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  transition: all 0.4s ease;
}

.strength-segment.active.danger  { background: #ff3366; box-shadow: 0 0 8px rgba(255, 51, 102, 0.4); }
.strength-segment.active.warning { background: #ffaa00; box-shadow: 0 0 8px rgba(255, 170, 0, 0.4); }
.strength-segment.active.info    { background: #00ccff; box-shadow: 0 0 8px rgba(0, 204, 255, 0.4); }
.strength-segment.active.primary { background: #0077ff; box-shadow: 0 0 8px rgba(0, 119, 255, 0.4); }
.strength-segment.active.success { background: #00e676; box-shadow: 0 0 8px rgba(0, 230, 118, 0.4); }

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  margin-top: var(--space-lg);
}

.footer-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin: 0;
}

.footer-note i {
  font-size: 0.8rem;
}
