/* ===========================================
   Mindestgas Pro – Punkfish Academy Brand
   Light Theme with Brand Colors
   =========================================== */

/* CSS Custom Properties - Punkfish Brand Colors */
:root {
  --pf-navy: #1a365d;
  --pf-navy-light: #2d4a7c;
  --pf-yellow: #ffcc00;
  --pf-yellow-hover: #e6b800;
  --pf-cream: #f8f6f0;
  --pf-white: #ffffff;
  --pf-sky-blue: #4a90c2;
  --pf-text: #2d3748;
  --pf-text-light: #4a5568;
  --pf-border: #e2e8f0;
  --pf-shadow: rgba(26, 54, 93, 0.1);

  /* Status colors (traffic light - keep as-is) */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
}

.mgp-tool {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--pf-cream);
  padding: 24px;
  border-radius: 12px;
}

/* Haupttitel */
.mgp-tool h1 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--pf-navy);
  letter-spacing: -0.02em;
}

.mgp-tool>p {
  text-align: center;
  color: var(--pf-text-light);
  font-size: 0.9rem;
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* Gesamtbreite des Pro-Rechners */
.pf-tool-frame.mgp-tool {
  max-width: 800px;
  margin: 0 auto;
}

/* Desktop-Layout: Spalten */
.mgp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.mgp-person {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 280px;
  text-align: center;
}

/* ===========================================
   Cards - Clean White Style
   =========================================== */
.mgp-block {
  margin: 16px 0;
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid var(--pf-border);
  background: var(--pf-white);
  box-shadow: 0 2px 8px var(--pf-shadow);
  box-sizing: border-box;
  transition: box-shadow 0.2s ease;
}

.mgp-block:hover {
  box-shadow: 0 4px 16px var(--pf-shadow);
}

.mgp-block h2 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pf-navy);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Person Headers */
.mgp-person h3 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pf-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Gemeinsame Felder */
.mgp-row--shared,
.mgp-row--single {
  justify-content: center;
}

.mgp-field {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 220px;
  text-align: center;
}

/* ===========================================
   Inputs - Clean Style
   =========================================== */
.mgp-tool label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pf-text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mgp-tool input[type="number"],
.mgp-tool input[type="text"] {
  display: block;
  width: 100%;
  max-width: 180px;
  margin: 0 auto 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--pf-text);

  border-radius: 8px;
  border: 2px solid var(--pf-border);
  background: var(--pf-white);
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.mgp-tool input[type="number"]:hover {
  border-color: var(--pf-sky-blue);
}

.mgp-tool input[type="number"]:focus,
.mgp-tool input[type="text"]:focus {
  border-color: var(--pf-navy);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.15);
  outline: none;
}

.mgp-tool input[type="number"] {
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
}

/* Readonly Inputs */
.mgp-tool input[readonly] {
  background: #f7fafc;
  color: var(--pf-text-light);
  cursor: default;
  border-color: var(--pf-border);
}

.mgp-tool input[readonly]:focus {
  border-color: var(--pf-border);
  box-shadow: none;
}

.mgp-tool input[readonly]::-webkit-inner-spin-button,
.mgp-tool input[readonly]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.mgp-tool input[readonly] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ===========================================
   Checkbox Toggle
   =========================================== */
.mgp-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--pf-text-light);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  background: #f7fafc;
  border: 1px solid var(--pf-border);
  transition: all 0.2s ease;
}

.mgp-check:hover {
  background: #edf2f7;
  border-color: var(--pf-sky-blue);
}

.mgp-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--pf-navy);
  cursor: pointer;
}

/* ===========================================
   Action Block & Button - Punkfish Yellow!
   =========================================== */
.mgp-block--action {
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.08) 0%, rgba(255, 204, 0, 0.04) 100%);
  border-color: rgba(255, 204, 0, 0.3);
}

.mgp-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mgp-block--action button {
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 14px 24px;
  margin: 0 auto;

  background: var(--pf-yellow);
  color: var(--pf-navy);
  border: none;
  border-radius: 8px;

  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;

  box-shadow: 0 2px 8px rgba(255, 204, 0, 0.3);
  transition: all 0.2s ease;
}

.mgp-block--action button:hover {
  background: var(--pf-yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 204, 0, 0.4);
}

.mgp-block--action button:active {
  transform: translateY(0);
}

/* Reserve Input */
.mgp-reserve label {
  margin-bottom: 6px;
}

.mgp-reserve input[type="number"] {
  max-width: 120px;
}

/* ===========================================
   Results Section
   =========================================== */
.mgp-results {
  margin-top: 16px;
  padding: 20px;
  text-align: center;
  background: var(--pf-white);
  border-radius: 12px;
  border: 1px solid var(--pf-border);
  box-shadow: 0 2px 8px var(--pf-shadow);
}

.mgp-results>div {
  margin: 6px 0;
  font-size: 0.95rem;
  color: var(--pf-text-light);
}

.mgp-tool #ergebnis {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pf-navy);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--pf-border);
}

#ergebnisBarIchReserve,
#ergebnisBarBuddyReserve {
  font-weight: 600;
  color: var(--pf-text);
}

/* ===========================================
   SMART BOTTLE VISUALIZATION
   =========================================== */
.mgp-bottles {
  margin-top: 24px;
  padding: 32px 24px;
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  background: var(--pf-white);
  border-radius: 12px;
  border: 1px solid var(--pf-border);
  box-shadow: 0 2px 8px var(--pf-shadow);
}

/* Bottle Container with Label */
.bottle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.bottle-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pf-navy);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.bottle-wrapper {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

/* Pressure Scale */
.pressure-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--pf-text-light);
  padding: 8px 0;
  height: 200px;
}

/* Modern Tank Design */
.mgp-bottles .flasche {
  width: 60px;
  height: 200px;
  position: relative;
  border-radius: 12px 12px 20px 20px;
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 40%, #e2e8f0 60%, #cbd5e1 100%);
  box-shadow:
    inset -6px 0 12px rgba(0, 0, 0, 0.1),
    inset 6px 0 12px rgba(255, 255, 255, 0.4),
    2px 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: all 0.4s ease;
}

/* Valve/Neck at top */
.flasche::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 16px;
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 50%, #64748b 100%);
  border-radius: 4px 4px 0 0;
  box-shadow:
    inset -2px 0 4px rgba(0, 0, 0, 0.15),
    inset 2px 0 4px rgba(255, 255, 255, 0.2);
}

/* Handle on valve */
.flasche::after {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 10px;
  background: linear-gradient(90deg, #475569 0%, #64748b 50%, #475569 100%);
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Gas Zones Container */
.gas-zones {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Free Gas Zone */
.free-gas {
  background: linear-gradient(180deg,
      rgba(16, 185, 129, 0.75) 0%,
      rgba(16, 185, 129, 0.9) 100%);
  transition: height 0.5s ease;
}

/* Minimum Gas Zone */
.mgp-bottles .mindestgas {
  position: relative;
  background: linear-gradient(180deg,
      rgba(245, 158, 11, 0.85) 0%,
      rgba(234, 88, 12, 0.95) 100%);
  transition: all 0.5s ease;
  z-index: 2;
}

/* Reserve Zone */
.mgp-bottles .reserve {
  position: relative;
  background: linear-gradient(180deg,
      rgba(239, 68, 68, 0.85) 0%,
      rgba(185, 28, 28, 0.95) 100%);
  transition: all 0.5s ease;
  z-index: 1;
}

/* Zone positioning */
.mgp-bottles .mindestgas,
.mgp-bottles .reserve {
  position: relative;
  width: 100%;
  left: auto;
  bottom: auto;
}

/* Zone Labels (inside zones) */
.zone-label {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* External Labels Container */
.bottle-labels {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.7rem;
  min-width: 80px;
}

.label-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f7fafc;
  border: 1px solid var(--pf-border);
  font-weight: 600;
}

.label-item.free {
  color: var(--success-color);
}

.label-item.mingas {
  color: #ea580c;
}

.label-item.reserve-label {
  color: var(--danger-color);
}

.label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.label-dot.free {
  background: var(--success-color);
}

.label-dot.mingas {
  background: #f59e0b;
}

.label-dot.reserve-dot {
  background: var(--danger-color);
}

/* Beschriftung (hide old labels) */
.mgp-bottles .beschriftung {
  display: none;
}

/* Pressure Gauge */
.pressure-gauge {
  width: 80px;
  height: 80px;
  position: relative;
  margin-top: 8px;
}

.gauge-bg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 135deg,
      var(--success-color) 0deg 90deg,
      var(--warning-color) 90deg 135deg,
      var(--danger-color) 135deg 180deg,
      #e5e7eb 180deg 270deg);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.gauge-value {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--pf-text);
  line-height: 1;
}

.gauge-unit {
  font-size: 0.55rem;
  color: var(--pf-text-light);
  font-weight: 600;
}

.gauge-needle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 32px;
  background: linear-gradient(to top, var(--pf-navy), transparent);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(0deg);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 2px;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.status-badge.safe {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.moderate {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning-color);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger-color);
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulse-badge 1.5s ease-in-out infinite;
}

.status-icon {
  font-size: 1rem;
}

/* Glow Effects for Bottles */
.flasche.glow-safe {
  box-shadow:
    inset -6px 0 12px rgba(0, 0, 0, 0.1),
    inset 6px 0 12px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(16, 185, 129, 0.4),
    2px 4px 12px rgba(0, 0, 0, 0.15);
}

.flasche.glow-moderate {
  box-shadow:
    inset -6px 0 12px rgba(0, 0, 0, 0.1),
    inset 6px 0 12px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(245, 158, 11, 0.5),
    2px 4px 12px rgba(0, 0, 0, 0.15);
}

.flasche.glow-critical {
  box-shadow:
    inset -6px 0 12px rgba(0, 0, 0, 0.1),
    inset 6px 0 12px rgba(255, 255, 255, 0.4),
    0 0 25px rgba(239, 68, 68, 0.6),
    2px 4px 12px rgba(0, 0, 0, 0.15);
  animation: pulse-glow-light 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes pulse-glow-light {

  0%,
  100% {
    box-shadow:
      inset -6px 0 12px rgba(0, 0, 0, 0.1),
      inset 6px 0 12px rgba(255, 255, 255, 0.4),
      0 0 25px rgba(239, 68, 68, 0.6),
      2px 4px 12px rgba(0, 0, 0, 0.15);
  }

  50% {
    box-shadow:
      inset -6px 0 12px rgba(0, 0, 0, 0.1),
      inset 6px 0 12px rgba(255, 255, 255, 0.4),
      0 0 35px rgba(239, 68, 68, 0.8),
      2px 4px 12px rgba(0, 0, 0, 0.15);
  }
}

@keyframes pulse-badge {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Legacy blink animation override */
@keyframes blink {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
  }

  50% {
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.8);
  }
}

.mgp-bottles .flasche.critical {
  animation: pulse-glow-light 1.5s ease-in-out infinite;
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 700px) {
  .mgp-tool {
    padding: 16px;
  }

  .mgp-tool h1 {
    font-size: 1.4rem;
  }

  .mgp-block {
    margin: 12px 0;
    padding: 16px;
  }

  .mgp-block h2 {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .mgp-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .mgp-person {
    width: 100%;
    max-width: 280px;
  }

  .mgp-bottles {
    gap: 40px;
    padding: 24px 16px;
  }

  .bottle-wrapper {
    gap: 8px;
  }

  .mgp-bottles .flasche {
    width: 50px;
    height: 160px;
  }

  .pressure-scale {
    height: 160px;
    font-size: 0.6rem;
  }

  .bottle-labels {
    min-width: 70px;
    font-size: 0.65rem;
  }

  .pressure-gauge {
    width: 70px;
    height: 70px;
  }

  .gauge-center {
    width: 44px;
    height: 44px;
  }

  .gauge-value {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .mgp-bottles {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
}