/* ============================================================
   Pokémon Red, Yellow, Blue (Gen 1 RBY) Damage Calculator Styling
   Scenic IT Solutions Theme Styling
   ============================================================ */

.pkmn-calc-wrapper {
  width: 100%;
  color: #f0f0f8;
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Two-column layout */
.pkmn-grid-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 30px;
  align-items: start;
  margin-bottom: 40px;
}

@media (max-width: 1080px) {
  .pkmn-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Battle Card Styling */
.pkmn-card {
  background: rgba(16, 17, 24, 0.95);
  border: 1px solid #282a3c;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.pkmn-card-header {
  border-bottom: 1px solid #252738;
  padding-bottom: 16px;
  margin-bottom: 22px;
}

.pkmn-card-title {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pkmn-card-subtitle {
  font-size: 13.5px;
  color: #9292a8;
  margin: 0;
  line-height: 1.5;
}

/* Pokémon Battler Two-Column Form */
.pkmn-battlers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 700px) {
  .pkmn-battlers-grid {
    grid-template-columns: 1fr;
  }
}

.pkmn-battler-box {
  background: #11121b;
  border: 1px solid #252738;
  border-radius: 14px;
  padding: 20px;
}

.pkmn-battler-title {
  font-size: 16px;
  font-weight: 700;
  color: #F68B1F;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form Controls */
.pkmn-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.pkmn-field label {
  font-size: 13px;
  font-weight: 600;
  color: #d2d2e2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pkmn-field-hint {
  font-size: 11px;
  color: #7b7b92;
  font-weight: 400;
}

.pkmn-input,
.pkmn-select {
  width: 100%;
  background: #151624;
  border: 1.5px solid #2d2f44;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  outline: none;
  transition: all 0.25s ease;
  font-family: inherit;
}

.pkmn-input:focus,
.pkmn-select:focus {
  border-color: #0099E5;
  background: #1a1c2e;
  box-shadow: 0 0 0 3px rgba(0, 153, 229, 0.15);
}

.pkmn-select {
  cursor: pointer;
}

/* Move & Stage Selectors */
.pkmn-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

/* Type Pill Badges */
.type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.type-normal { background: #A8A878; }
.type-fire { background: #F08030; }
.type-water { background: #6890F0; }
.type-electric { background: #F8D030; color:#000; }
.type-grass { background: #78C850; }
.type-ice { background: #98D8D8; color:#000; }
.type-fighting { background: #C03028; }
.type-poison { background: #A040A0; }
.type-ground { background: #E0C068; color:#000; }
.type-flying { background: #A890F0; }
.type-psychic { background: #F85888; }
.type-bug { background: #A8B820; }
.type-rock { background: #B8A038; }
.type-ghost { background: #705898; }
.type-dragon { background: #7038F8; }

/* Sticky Results Sidebar */
.pkmn-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pkmn-hero-card {
  background: linear-gradient(180deg, #171826 0%, #0d0e17 100%);
  border: 1px solid #32354c;
  border-radius: 20px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.pkmn-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e53935 0%, #F68B1F 50%, #0099E5 100%);
}

.pkmn-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: #0099E5;
  background: rgba(0, 153, 229, 0.12);
  border: 1px solid rgba(0, 153, 229, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.pkmn-damage-range {
  text-align: center;
  padding: 10px 0 18px 0;
  border-bottom: 1px solid #25273b;
}

.pkmn-damage-numbers {
  font-size: 44px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.pkmn-damage-pct {
  font-size: 20px;
  font-weight: 700;
  color: #F68B1F;
}

.pkmn-ko-chance {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.ko-guaranteed {
  background: rgba(0, 255, 170, 0.15);
  color: #00ffaa;
  border: 1px solid rgba(0, 255, 170, 0.3);
}

.ko-possible {
  background: rgba(246, 139, 31, 0.15);
  color: #F68B1F;
  border: 1px solid rgba(246, 139, 31, 0.3);
}

.ko-low {
  background: rgba(255, 77, 77, 0.15);
  color: #ff5555;
  border: 1px solid rgba(255, 77, 77, 0.3);
}

/* HP Remaining Health Bar */
.pkmn-hp-wrap {
  margin: 18px 0;
}

.pkmn-hp-bar {
  width: 100%;
  height: 12px;
  background: #1c1d29;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.pkmn-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ffaa, #F68B1F, #ff5555);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.pkmn-hp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #8c8ca5;
  margin-top: 6px;
}

/* Stats 2x2 Grid */
.pkmn-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.pkmn-stat-box {
  background: #11121b;
  border: 1px solid #232537;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.pkmn-stat-label {
  font-size: 10.5px;
  font-weight: 500;
  color: #8c8ca4;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pkmn-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

/* Action Buttons */
.pkmn-btn-primary {
  background: linear-gradient(135deg, #F68B1F 0%, #d87311 100%);
  color: #000000;
  font-weight: 700;
  font-size: 13.5px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  width: 100%;
  box-shadow: 0 4px 15px rgba(246, 139, 31, 0.3);
}

.pkmn-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(246, 139, 31, 0.45);
}

.pkmn-btn-secondary {
  background: #181924;
  color: #cfcfe2;
  border: 1px solid #2d2f44;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 8px;
}

.pkmn-btn-secondary:hover {
  background: #232536;
  color: #ffffff;
  border-color: #3f425f;
}

/* Formula Step-by-Step Box */
.pkmn-step-math-box {
  background: #111219;
  border: 1px solid #27283c;
  border-radius: 12px;
  padding: 18px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: #d1d1e6;
  margin-top: 18px;
}

.pkmn-step-math-box code {
  color: #F68B1F;
}

/* Random Rolls Display (Gen 1: 39 Rolls 217..255) */
.pkmn-rolls-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  max-height: 160px;
  overflow-y: auto;
  padding: 10px;
  background: #111219;
  border: 1px solid #232536;
  border-radius: 10px;
}

.pkmn-roll-chip {
  background: #191b28;
  border: 1px solid #2e3148;
  color: #d6d6ec;
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: monospace;
}

.pkmn-roll-chip.min-roll {
  border-color: #ff5555;
  color: #ff7777;
}

.pkmn-roll-chip.max-roll {
  border-color: #00ffaa;
  color: #00ffaa;
  font-weight: 700;
}

/* Toast */
.pkmn-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1c1d29;
  border: 1px solid #F68B1F;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.pkmn-toast.show {
  transform: translateY(0);
  opacity: 1;
}
