/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #00f5ff;
  --primary-dark: #00b8c9;
  --accent: #ff2d55;
  --bg-dark: #0a0e17;
  --bg-card: #111827;
  --bg-input: #1a2332;
  --text-primary: #e8edf5;
  --text-secondary: #8899bb;
  --border-glow: rgba(0, 245, 255, 0.3);
  --shadow-glow: 0 0 30px rgba(0, 245, 255, 0.1);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 20px 12px;
  overflow-x: hidden;
  position: relative;
}

/* ===== PARTICLE BACKGROUND ===== */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== GLITCH OVERLAY ===== */
.glitch-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: 
    linear-gradient(45deg, transparent 65%, rgba(0, 245, 255, 0.02) 70%, transparent 75%),
    linear-gradient(-45deg, transparent 65%, rgba(255, 45, 85, 0.02) 70%, transparent 75%);
  animation: glitchMove 10s infinite;
}

@keyframes glitchMove {
  0%, 90%, 100% { transform: translate(0); opacity: 0.3; }
  92% { transform: translate(-2px, 2px); opacity: 0.6; }
  94% { transform: translate(2px, -2px); opacity: 0.4; }
  96% { transform: translate(-1px, 1px); opacity: 0.7; }
}

/* ===== APP CONTAINER ===== */
#app {
  max-width: 520px;
  width: 100%;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 40px;
  padding: 24px 20px 20px;
  border: 1px solid rgba(0, 245, 255, 0.15);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(0, 245, 255, 0.1),
    var(--shadow-glow);
  position: relative;
  z-index: 1;
  animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatIn {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.3);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 245, 255, 0.3); }
  50% { box-shadow: 0 0 60px rgba(0, 245, 255, 0.6); }
}

header h1 {
  font-family: 'Orbitron', monospace;
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.sub {
  font-size: 0.6rem;
  color: var(--text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
  -webkit-text-fill-color: var(--text-secondary);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 245, 255, 0.1);
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid rgba(0, 245, 255, 0.2);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--primary);
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ===== SECURITY BANNER ===== */
.security-banner {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--accent);
  background: rgba(255, 45, 85, 0.08);
  padding: 6px 0;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 45, 85, 0.15);
  font-weight: 600;
  text-shadow: 0 0 20px rgba(255, 45, 85, 0.2);
}

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: rgba(26, 35, 50, 0.5);
  padding: 4px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 6px;
  border-radius: 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

.tab-btn .icon {
  font-size: 1.2rem;
}

.tab-btn .label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(0, 245, 255, 0.05));
  color: var(--primary);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.2);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

/* ===== TAB CONTENT ===== */
.tab-content {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-content.active {
  display: flex;
}

@keyframes fadeSlide {
  0% { opacity: 0; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-header h2 {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.tool-badge {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--bg-dark);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tool-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== INPUT GROUPS ===== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-wrapper label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.input-field, textarea {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', monospace;
  transition: all 0.3s ease;
  outline: none;
  width: 100%;
}

.input-field:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 245, 255, 0.1), 0 0 30px rgba(0, 245, 255, 0.05);
  background: rgba(26, 35, 50, 0.8);
}

.input-field::placeholder, textarea::placeholder {
  color: rgba(136, 153, 187, 0.4);
}

textarea {
  resize: vertical;
  min-height: 80px;
  font-family: 'Inter', monospace;
  line-height: 1.6;
}

/* ===== CRACK BUTTON ===== */
.crack-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: var(--bg-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 16px 24px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
}

.crack-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.crack-btn:hover::before {
  opacity: 1;
}

.crack-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 40px rgba(0, 245, 255, 0.4);
}

.crack-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 5px 20px rgba(0, 245, 255, 0.2);
}

.crack-btn .btn-icon {
  font-size: 1.1rem;
}

/* ===== OUTPUT ===== */
.output {
  background: rgba(10, 14, 23, 0.8);
  border-radius: 16px;
  padding: 16px 20px;
  min-height: 70px;
  font-family: 'Inter', monospace;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 180px;
  overflow-y: auto;
  position: relative;
}

.output .placeholder {
  opacity: 0.4;
}

.output:has(:not(.placeholder)) {
  border-color: rgba(0, 245, 255, 0.15);
}

/* Scrollbar styling */
.output::-webkit-scrollbar {
  width: 4px;
}

.output::-webkit-scrollbar-track {
  background: transparent;
}

.output::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* ===== FOOTER ===== */
footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 0.6rem;
  color: var(--text-secondary);
  letter-spacing: 1px;
  flex-wrap: wrap;
}

.divider {
  opacity: 0.3;
}

#timestamp {
  font-family: 'Orbitron', monospace;
  color: var(--primary);
  opacity: 0.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  #app {
    padding: 16px 12px;
    border-radius: 28px;
  }
  
  header h1 {
    font-size: 1.2rem;
  }
  
  .logo-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  
  .tab-btn .label {
    font-size: 0.5rem;
  }
  
  .tab-btn .icon {
    font-size: 1rem;
  }
  
  .tool-header h2 {
    font-size: 0.95rem;
  }
  
  .crack-btn {
    font-size: 0.8rem;
    padding: 14px 18px;
  }
  
  .security-banner {
    font-size: 0.5rem;
    letter-spacing: 2px;
  }
}

@media (max-width: 380px) {
  .tab-btn {
    padding: 6px 4px;
  }
  
  .tab-btn .label {
    display: none;
  }
  
  .tab-btn .icon {
    font-size: 1.3rem;
  }
}