/* =========================
   GLOBAL RESET
   ========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: #0b0b0b;
  color: #eaeaea;
  line-height: 1.6;
}

/* =========================
   NAVBAR
   ========================= */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #111;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: bold;
  font-size: 1.2rem;
}

nav a {
  color: #ccc;
  margin-left: 20px;
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  color: #fff;
}

/* =========================
   CALCULATOR LAYOUT
   ========================= */

.page-wrap {
  padding: 20px;
}

h1 {
  margin-bottom: 14px;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  max-width: 760px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 14px;
}

input,
select {
  padding: 10px;
  background: #1c1c1c;
  border: 1px solid #333;
  color: #ffffff;
  border-radius: 6px;
}

button {
  grid-column: span 2;
  padding: 12px;
  background: #00b36b;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  color: #000;
}

button:hover {
  background: #00d67d;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hint,
.warning {
  grid-column: span 2;
  font-size: 13px;
}

.hint {
  color: #cccccc;
}

.warning {
  color: #ff5c5c;
}

/* =========================
   TABLE
   ========================= */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13px;
}

th,
td {
  border: 1px solid #333;
  padding: 10px 14px;
  text-align: center;
  white-space: nowrap;
}

th {
  background: #000;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

tr:nth-child(even) {
  background: #161616;
}

.loss {
  color: #ff5c5c;
  font-weight: 600;
}

.win {
  color: #00ff99;
  font-weight: 600;
}

/* =========================
   SUMMARY / HINT STYLES
   ========================= */

.max-losses {
  color: #ffffff;
  font-size: 13px;
  margin-top: 4px;
}

.max-losses .count {
  color: #ff3b3b;
  font-weight: bold;
}

.hint .ok {
  color: #00ff99;
  font-weight: bold;
  margin-left: 6px;
}

.hint .bad {
  color: #ff3b3b;
  font-weight: bold;
  margin-left: 6px;
}

/* =========================
   INFO TOOLTIP
   ========================= */

.info {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  cursor: help;
  font-size: 12px;
  color: #aaaaaa;
}

.info:hover {
  color: #ffffff;
}

.tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #1c1c1c;
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  width: 240px;
  line-height: 1.4;
  border: 1px solid #333;
  z-index: 10;
  transition: opacity 0.2s ease;
}

.info:hover .tooltip {
  visibility: visible;
  opacity: 1;
}