/* ===== ROOT DESIGN SYSTEM ===== */
:root {
  --bg: #09090e;
  --surface: #12101b;
  --surface-2: #1c182d;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --accent: #ff0080;
  --accent-2: #00f2fe;
  --accent-3: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  --text: #e8eaf6;
  --text-muted: #7b7fa3;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --transition: 0.2s ease;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated background orbs */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: float 15s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent); top: -150px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 450px; height: 450px; background: var(--accent-2); bottom: -150px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #6028ff; top: 40%; left: 40%; animation-delay: -10s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -40px) scale(1.05); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}

/* ===== APP CONTAINER ===== */
.app-container {
  position: relative; z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ===== HEADER ===== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 15px rgba(255, 0, 128, 0.5));
}
.header-logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-logo p { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* ===== GLASS PANEL ===== */
.glass-panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.step-badge {
  background: rgba(255, 0, 128, 0.15);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== DROPZONE ===== */
.dropzone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(0,0,0,0.2);
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(255,0,128,0.05);
  transform: scale(1.02);
}
.drop-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.dropzone p { color: var(--text-muted); font-size: 0.9rem; }
.drop-sub { font-size: 0.75rem !important; opacity: 0.6; margin-top: 0.25rem; }

/* ===== FILE INFO ===== */
.file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.file-icon { font-size: 2rem; }
.file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.file-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent-2);
  word-break: break-all;
}
.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== PASSWORD FIELD ===== */
.password-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-field-wrap .field-input {
  padding-right: 3rem;
}
.toggle-pw-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.5;
  transition: opacity var(--transition);
}
.toggle-pw-btn:hover { opacity: 1; }

.field-input {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
  transition: all var(--transition);
}
.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 128, 0.15);
}

/* ===== PROGRESS BAR ===== */
.progress-wrap {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===== RESULT SECTION ===== */
.result-empty, .result-success, .result-error {
  text-align: center;
  padding: 2rem 1rem;
}
.result-empty .empty-icon,
.success-icon, .error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.result-empty p { color: var(--text-muted); font-size: 0.85rem; }

.result-success h4 {
  color: var(--success);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.result-error h4 {
  color: var(--danger);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.result-error p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.result-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.meta-row span:first-child { color: var(--text-muted); }
.meta-row span:last-child { color: var(--accent-2); font-family: 'JetBrains Mono', monospace; font-weight: 600; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.4rem; border: none; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #e11d48); color: #fff;
  box-shadow: 0 4px 15px rgba(255,0,128,0.3);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,0,128,0.5); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-accent {
  background: linear-gradient(135deg, var(--accent-2), #0284c7); color: #fff;
  box-shadow: 0 4px 15px rgba(0,242,254,0.3);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,242,254,0.5); }
.btn-outline {
  background: transparent; border: 1px solid var(--glass-border); color: var(--text);
}
.btn-outline:hover { background: var(--glass); border-color: rgba(255,255,255,0.2); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }
.btn-full { width: 100%; }

/* ===== INFO CARD ===== */
.info-card {
  background: rgba(0, 242, 254, 0.05);
  border-left: 3px solid var(--accent-2);
  padding: 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.info-card h4 { color: var(--accent-2); font-size: 0.9rem; margin-bottom: 0.5rem; }
.info-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* ===== UTILS ===== */
.hidden { display: none !important; }

/* ===== TABS ===== */
.main-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 1.5rem;
}
.tab-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--text); background: var(--glass); }
.tab-btn.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 15px rgba(255, 0, 128, 0.4);
}
.tab-icon { font-size: 1.1rem; }
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== METHOD TOGGLE ===== */
.method-toggle {
  display: flex; gap: 0.5rem; margin-bottom: 1.5rem;
  background: rgba(0,0,0,0.3); border-radius: var(--radius-sm); padding: 4px;
}
.method-btn {
  flex: 1; padding: 0.6rem 0.75rem;
  border: none; border-radius: 6px;
  background: transparent; color: var(--text-muted);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition);
}
.method-btn:hover { color: var(--text); }
.method-btn.active {
  background: rgba(255, 0, 128, 0.2); color: var(--accent);
  border: 1px solid rgba(255, 0, 128, 0.3);
}
.method-panel { animation: fadeIn 0.3s ease; }

/* ===== DICTIONARY ATTACK STATUS ===== */
.dict-status {
  margin-top: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.dict-info {
  font-size: 0.8rem; color: var(--text-muted);
  text-align: center; font-family: 'JetBrains Mono', monospace;
}
.dict-current {
  font-size: 0.75rem; color: var(--accent-2);
  text-align: center; font-family: 'JetBrains Mono', monospace;
}

/* ===== FOUND PASSWORD ===== */
.found-password {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.found-password span { color: var(--text-muted); }
.found-password code {
  color: var(--success); font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 1rem;
  background: rgba(34, 197, 94, 0.15); padding: 2px 8px; border-radius: 4px;
}

/* ===== PASSWORD GENERATOR ===== */
.pw-generator {
  margin-top: 1.25rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.pw-gen-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.75rem;
}
.pw-gen-output {
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(0,0,0,0.4); padding: 0.6rem 1rem;
  border-radius: 6px; margin-bottom: 0.75rem;
}
.pw-gen-output code {
  flex: 1; font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem; color: var(--accent-2); word-break: break-all;
}
.pw-gen-options label {
  font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.3rem;
}
.pw-gen-options input[type="range"] {
  -webkit-appearance: none; width: 100px; height: 4px;
  background: rgba(255,255,255,0.1); border-radius: 999px; outline: none;
}
.pw-gen-options input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
}
.pw-checkboxes {
  display: flex; gap: 1rem; margin-top: 0.5rem; flex-wrap: wrap;
}
.pw-checkboxes label { cursor: pointer; }
.pw-checkboxes input[type="checkbox"] { accent-color: var(--accent); }

/* ===== FOOTER ===== */
.app-footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  border-top: 1px solid var(--glass-border);
  padding: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .app-container { padding: 1rem; }
  .header-logo h1 { font-size: 1.3rem; }
  .dropzone { padding: 1.5rem 1rem; }
  .method-toggle { flex-direction: column; }
  .main-tabs { flex-direction: column; }
}
