/* ── Code-Entschlüsseler Tool ── */

.cipher-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* ── Methoden-Auswahl ── */
.cipher-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.cipher-method-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: 2px solid rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.06);
  color: rgba(245, 158, 11, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.cipher-method-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.cipher-method-btn.is-active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.cipher-method-btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(148, 163, 184, 0.4);
}

/* ── Zwei-Spalten-Layout ── */
.cipher-columns {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cipher-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cipher-arrow-col {
  display: flex;
  align-items: flex-start;
  padding-top: 52px;
  flex-shrink: 0;
}

.cipher-arrow {
  display: block;
  font-size: 1.5rem;
  color: rgba(245, 158, 11, 0.4);
  animation: cipherArrowPulse 2s ease-in-out infinite;
}

@keyframes cipherArrowPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

/* ── Ein-/Ausgabe-Felder ── */
.cipher-field {
  width: 100%;
  min-height: 100px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 1rem;
  font-family: 'Inter', 'Courier New', monospace;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.cipher-field:focus {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.cipher-field::placeholder {
  color: rgba(148, 163, 184, 0.4);
}

.cipher-field--output {
  background: rgba(245, 158, 11, 0.03);
  border-color: rgba(245, 158, 11, 0.15);
}

/* ── Label ── */
.cipher-label {
  display: block;
  width: 100%;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.6);
  margin-bottom: 6px;
  text-align: center;
}

/* ── Spalten-Hinweis ── */
.cipher-column-hint {
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.4);
  text-align: center;
  margin-top: 6px;
  margin-bottom: 8px;
}

/* ── Buttons ── */
.cipher-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.cipher-btn--copy {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
  color: #22c55e;
  margin-top: 12px;
}

.cipher-btn--copy:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.15);
  transform: scale(1.03);
}

.cipher-btn--copy.copied {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

/* ── Info-Box für Methode ── */
.cipher-info {
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.7);
  line-height: 1.5;
  text-align: center;
}

.cipher-info code {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .cipher-columns {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .cipher-column {
    align-items: stretch;
  }

  .cipher-arrow-col {
    padding-top: 4px;
    align-self: center;
  }

  .cipher-arrow {
    transform: rotate(90deg);
    font-size: 1.3rem;
  }

  .cipher-method-btn {
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .cipher-field {
    min-height: 80px;
    font-size: 0.95rem;
    padding: 12px;
  }

  .cipher-btn {
    padding: 8px 16px;
    font-size: 0.82rem;
    width: 100%;
  }

  .cipher-label {
    text-align: left;
  }

  .cipher-column-hint {
    text-align: left;
  }
}
