@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@300;400;600;700&display=swap');

:root {
  /* Cyber-Industrial Palette */
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  --accent-primary: #f97316;
  /* Safety Orange */
  --accent-glow: rgba(249, 115, 22, 0.4);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: rgba(148, 163, 184, 0.2);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);

  /* Spacing & Radius */
  --radius-md: 12px;
  --radius-sm: 6px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Background Image Overlay */
#bgSlider {
  opacity: 0.4;
  filter: grayscale(40%) contrast(110%);
}

#bgSlider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 90%);
}

/* Typography */
h1,
h2,
h3,
.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

.main-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.main-subtitle {
  color: var(--accent-primary);
  letter-spacing: 0.2em;
  font-size: 0.875rem;
  text-transform: uppercase;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Glassmorphism Cards */
.param-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.param-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 0 20px rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
}

.param-title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.1rem;
}

.param-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.param-icon {
  color: var(--accent-primary);
  background: rgba(249, 115, 22, 0.1);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-right: 1rem;
}

.param-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
}

/* Buttons (Chips) */
.option-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.option-btn.active {
  background: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
  font-weight: 700;
  box-shadow: 0 0 15px var(--accent-glow);
}

.option-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-style: dashed;
}

/* Tabs */
.tabs-header {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
  border-radius: 100px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

.tab-btn:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Checkboxes */
.checkbox-card {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.checkbox-card.checked {
  background: rgba(249, 115, 22, 0.1);
  border-color: var(--accent-primary);
}

.styled-checkbox {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  margin-right: 0.75rem;
  position: relative;
  transition: all 0.2s;
}

.styled-checkbox:checked {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.styled-checkbox:checked::after {
  content: '✓';
  position: absolute;
  color: #000;
  font-size: 0.9rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
}

/* Sticky Footer / Result Bar */
.shifr-section {
  position: sticky;
  bottom: 20px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 3rem;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  z-index: 50;
}

.shifr-title {
  color: var(--accent-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shifr-result {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: #fff;
  word-break: break-all;
}

.shifr-valid {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.shifr-valid.valid {
  color: #4ade80;
}

.shifr-valid.invalid {
  color: #ef4444;
}

/* Action Buttons */
.action-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.action-btn.primary {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
}

.action-btn.secondary {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-main);
}

.action-btn.secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.tab-content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-content.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.4s ease-out;
}

/* Custom Selects */
.custom-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  outline: none;
}

.custom-select:focus {
  border-color: var(--accent-primary);
}