/* ============================================================================
   ipv4.css — Tool-spezifische Styles für IPV4 TOOLS
   Geladen auf: tools/ipv4.php  (NACH main-vhc.css)
   ============================================================================ */

/* ── Seitenbereich ───────────────────────────────── */

body.tool-page main {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 52px;
}

/* ── Tool-Header ─────────────────────────────────── */

.ip-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.ip-icon {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 24px rgba(0, 245, 255, 0.35));
}

.ip-title {
  font-family: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--neon1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.45);
  margin: 0 0 0.5rem 0;
}

.ip-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0;
}

/* ── Tool-Wrapper ────────────────────────────────── */

.tool-wrap {
  width: 100%;
  max-width: 1000px;
}

/* ── Tabs (entfernt beim Karten-Redesign — Markup nicht mehr vorhanden) ──
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid #141e30;
  margin-bottom: 1.6rem;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}

.tab-btn.active {
  color: var(--neon1);
  border-bottom-color: var(--neon1);
}

.tab-btn:hover:not(.active) {
  color: var(--text);
}

.tab-content {
  display: block;
}

.tab-content.hidden {
  display: none;
}
*/

/* ── Funktionsgruppen (IPv4 / IPv6) ──────────────── */

.ip-group {
  margin-bottom: 2.4rem;
}

.ip-group:last-of-type {
  margin-bottom: 0;
}

.ip-group-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text);
  margin: 0 0 1.1rem 0;
}

.ip-group-bar {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 1.3rem;
  border-radius: 2px;
}

.ip-group-bar--cyan {
  background: var(--neon1);
  box-shadow: 0 0 12px -1px var(--neon1);
}

.ip-group-bar--green {
  background: var(--neon4);
  box-shadow: 0 0 12px -1px var(--neon4);
}

/* ── Karten-Grid ─────────────────────────────────── */

.ip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

/* ── Karte (percent-calc-Stil) ───────────────────── */

.ip-card {
  --ip-acc: #00f5ff;
  position: relative;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(0, 245, 255, 0.05), transparent 55%),
    linear-gradient(180deg, #0d1626, #0a1120);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ip-acc);
  border-radius: 6px;
  padding: 1.1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ip-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35),
              0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transform: translateY(-2px);
}

.ip-card--wide {
  grid-column: 1 / -1;
}

/* Akzentfarben pro Karte */
.ip-card[data-accent="cyan"]   { --ip-acc: #00f5ff; }
.ip-card[data-accent="green"]  { --ip-acc: #00ff88; }
.ip-card[data-accent="violet"] { --ip-acc: #9d6bff; }
.ip-card[data-accent="amber"]  { --ip-acc: #ffb454; }

/* Akzent-spezifischer Kartenschimmer (Top-Right-Glow) */
.ip-card[data-accent="green"] {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(0, 255, 136, 0.05), transparent 55%),
    linear-gradient(180deg, #0d1626, #0a1120);
}

.ip-card[data-accent="violet"] {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(157, 107, 255, 0.06), transparent 55%),
    linear-gradient(180deg, #0d1626, #0a1120);
}

/* ── Kartenkopf ──────────────────────────────────── */

.ip-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.ip-num {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ip-acc);
  border: 1px solid var(--ip-acc);
  border-radius: 50%;
  box-shadow: 0 0 12px -2px var(--ip-acc);
}

.ip-card-het {
  min-width: 0;
}

.ip-card-title {
  font-family: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 0.15rem 0 0.3rem 0;
}

.ip-card-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* ── Hinweistext ─────────────────────────────────── */

.ip-hint {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 1.2rem 0;
}

/* ── Eingabezeile ────────────────────────────────── */

.ip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.ip-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 12rem;
  min-width: 0;
}

.ip-field--mask,
.ip-field--fmt {
  flex: 1 1 9rem;
}

.ip-field-lbl {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.ip-in,
.ip-select {
  width: 100%;
  background: #0a101e;
  border: 1px solid #243859;
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'Consolas', 'Courier New', monospace;
  padding: 0.55rem 0.75rem;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ip-select {
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  cursor: pointer;
}

.ip-in:focus,
.ip-select:focus {
  border-color: var(--ip-acc, var(--neon1));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.ip-in::placeholder {
  color: #4a6488;
}

/* ── Berechnen-Button (nutzt .convert-btn-Konvention) ── */

.convert-btn {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--ip-acc, var(--neon1));
  color: var(--ip-acc, var(--neon1));
  font-size: 0.78rem;
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.65rem;
  cursor: pointer;
  border-radius: 2px;
  margin-bottom: 1.2rem;
  transition: background 0.2s, box-shadow 0.2s;
}

.convert-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 14px -2px var(--ip-acc, var(--neon1));
}

/* ── Fehlermeldung ───────────────────────────────── */

.ip-error {
  display: none;
  background: rgba(255, 64, 96, 0.07);
  border: 1px solid rgba(255, 64, 96, 0.45);
  border-left: 3px solid #ff4060;
  border-radius: 4px;
  color: #ff6b82;
  font-size: 0.85rem;
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.1rem;
}

.ip-error.visible {
  display: block;
}

/* ── Ergebnisbereich ─────────────────────────────── */

.result-area {
  background: #070c16;
  border: 1px solid var(--border);
  border-left: 3px solid var(--ip-acc, var(--neon1));
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  margin-top: auto;
  margin-bottom: 0;
  box-shadow: 0 0 22px -14px var(--ip-acc, var(--neon1));
  display: none;
}

.result-area.visible {
  display: block;
}

.result-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

/* ── Ergebnis-Tabelle ────────────────────────────── */

.ip-table {
  width: 100%;
  border-collapse: collapse;
}

.ip-table tr {
  border-bottom: 1px solid #0d1525;
}

.ip-table tr:last-child {
  border-bottom: none;
}

.ip-table th {
  text-align: left;
  font-weight: 400;
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.4rem 0.9rem 0.4rem 0;
  white-space: nowrap;
  vertical-align: top;
}

.ip-table td {
  text-align: right;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.92rem;
  color: var(--text);
  padding: 0.4rem 0 0.4rem 0.5rem;
  word-break: break-all;
}

.ip-table td.ip-val--accent {
  color: var(--ip-acc, var(--neon1));
}

.ip-table td.ip-val--tag {
  color: #ffb454;
}

/* Kopierbare Werte: zarter Cursor-Hinweis */
.ip-table .ip-copy {
  cursor: pointer;
  transition: color 0.15s;
}

.ip-table .ip-copy:hover {
  color: var(--ip-acc, var(--neon1));
}

.ip-table .ip-copy.copied {
  color: var(--neon4);
}

/* ── Range-Liste ─────────────────────────────────── */

.ip-range-list {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 0.9rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.1rem 1rem;
}

.ip-range-item {
  display: block;
  white-space: nowrap;
}

.ip-range-item .ip-range-idx {
  color: var(--muted);
  margin-right: 0.5rem;
}

/* ── Kopieren-Button ─────────────────────────────── */

.copy-btn {
  background: none;
  border: 1px solid #2e4a72;
  color: var(--muted);
  font-size: 0.72rem;
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.copy-btn:hover {
  border-color: var(--ip-acc, var(--neon1));
  color: var(--ip-acc, var(--neon1));
}

.copy-btn.copied {
  border-color: var(--neon4);
  color: var(--neon4);
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 820px) {
  .ip-grid {
    grid-template-columns: 1fr;
  }
  .ip-card--wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .ip-title {
    font-size: 2rem;
  }
  .ip-table th {
    white-space: normal;
  }
}
