/* ===== GLOBAL RESET ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #e2e8f0;
  margin: 0;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

form {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  form {
    flex-direction: column;
  }
}

/* ===== TITLE ===== */
h1 {
  text-align: center;
  font-size: 2.5rem;
  letter-spacing: 1px;
  margin-bottom: 30px;
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56,189,248,0.3);
}

/* ===== CARDS (TACTICAL PANELS) ===== */
.card {
  flex: 1;
  min-width: 320px;

  background: linear-gradient(145deg, #1e293b, #0f172a);
  padding: 20px;
  border-radius: 14px;

  border: 1px solid rgba(56,189,248,0.15);
  box-shadow:
    0 10px 25px rgba(0,0,0,0.5),
    inset 0 0 20px rgba(56,189,248,0.05);

  transition: 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 15px 35px rgba(0,0,0,0.6),
    inset 0 0 25px rgba(56,189,248,0.08);
}

.card h2 {
  margin-bottom: 15px;
  font-size: 1.4rem;
  color: #7dd3fc;
  border-bottom: 1px solid rgba(56,189,248,0.2);
  padding-bottom: 5px;
}

/* ===== FORM ELEMENTS ===== */
label {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #94a3b8;
}

input, select {
  width: 100%;
  padding: 12px;
  margin-top: 5px;
  border-radius: 6px;
  border: 1px solid transparent;

  background: #020617;
  color: #e2e8f0;

  transition: 0.2s;
}

input:focus, select:focus {
  outline: none;
  border: 1px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56,189,248,0.4);
}

/* ===== UNIT PREVIEW (STAT BLOCK) ===== */
.unit-preview {
  margin-top: 10px;
  padding: 12px;

  background: #020617;
  border-radius: 8px;

  border: 1px solid rgba(56,189,248,0.2);

  text-align: center;
  font-size: 0.9rem;

  box-shadow: inset 0 0 10px rgba(56,189,248,0.05);
}

/* ===== CALC BOX ===== */
#attacker_calc, 
#defender_calc {
  margin-top: 10px;
  padding: 10px;

  background: #020617;
  /* border-left: 4px solid #38bdf8; */

  font-size: 0.85rem;
  color: #cbd5f5;
}

/* ===== CHECKBOX GRID ===== */
.checkbox-group {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* 🔑 force left alignment */

    gap: 10px;

    padding: 12px;
    border-radius: 8px;

    background: #020617;
    border: 1px solid rgba(56,189,248,0.1);

    cursor: pointer;
    transition: 0.2s;

    text-align: left;              /* 🔑 fix text alignment */
}

.checkbox-group label:hover {
  background: rgba(56,189,248,0.1);
}

.checkbox-group input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;                    /* 🔑 removes weird centering */
}

.checkbox-group label span {
    flex: 1;
    text-align: left;
    line-height: 1.2;
}

.checkbox-group label:hover {
  background: rgba(56,189,248,0.08);
}

.checkbox-group input:checked + span {
  color: #38bdf8;
  font-weight: 600;
}

/* ===== ACTION BUTTON ===== */
.action {
  width: 100%;
  text-align: center;
  margin-top: 20px;
}

button {
  width: 100%;
  max-width: 300px;

  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: none;

  padding: 14px;
  font-size: 1rem;
  font-weight: bold;

  border-radius: 10px;
  cursor: pointer;

  color: #020617;

  transition: 0.2s;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(56,189,248,0.6);
}

/* ===== RESULT PANEL ===== */
.result {
  margin-top: 25px;
  padding: 20px;

  border-radius: 12px;
  text-align: center;

  font-size: 1.3rem;
  font-weight: bold;

  background: #020617;

  border: 1px solid rgba(56,189,248,0.2);

  box-shadow: inset 0 0 20px rgba(56,189,248,0.05);
}
