:root {
  --bg: #e5e7eb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
  --dark: #111827;
  --warn: #f59e0b;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #f8fafc 0%, var(--bg) 45%, #d1d5db 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.app {
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px;
}


.brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-logo {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 22px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  padding: 8px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: stretch;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: white;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.hero p {
  margin: 0;
  color: #d1d5db;
  max-width: 840px;
  line-height: 1.5;
}

.state-card {
  min-width: 180px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  align-content: center;
  text-align: center;
}

.state-card span,
.state-card small {
  color: #d1d5db;
}

.state-card strong {
  font-size: 42px;
}

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

.panel,
.card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 16px;
  height: fit-content;
}

.sidebar h2,
.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.sidebar h2:not(:first-child) {
  margin-top: 22px;
}

label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 10px 0 6px;
}

input,
select,
button {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
}

button {
  border: none;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.btn.primary { background: var(--primary); }
.btn.success { background: var(--success); }
.btn.danger { background: var(--danger); }
.btn.dark { background: var(--dark); margin-top: 10px; }

.status-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.status-box div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 10px;
}

.status-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-box strong {
  font-size: 13px;
}

.hint {
  background: #f3f4f6;
  color: var(--muted);
  border-radius: 12px;
  padding: 12px;
  line-height: 1.5;
  font-size: 12px;
  margin-top: 12px;
}

.content {
  display: grid;
  gap: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.card {
  padding: 15px;
  text-align: center;
}

.card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.card strong {
  font-size: 22px;
}

.panel {
  padding: 16px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.digit-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 12px;
}

.digit-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  position: relative;
}

.digit-card.top {
  border-color: rgba(22, 163, 74, 0.55);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.10);
}

.digit-card.least {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.digit {
  width: 58px;
  height: 58px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary) 0deg, #d1d5db 0deg);
}

.digit span {
  background: #111827;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
}

.percent {
  font-weight: 900;
}

.count {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.list {
  display: grid;
  gap: 8px;
  max-height: 450px;
  overflow-y: auto;
}

.item {
  border-left: 5px solid var(--primary);
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.item.win {
  border-left-color: var(--success);
  background: rgba(22, 163, 74, 0.08);
}

.item.loss,
.item.error {
  border-left-color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
}

.item.warning {
  border-left-color: var(--warn);
  background: rgba(245, 158, 11, 0.10);
}

.item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 18px 0;
}

.positive { color: var(--success); }
.negative { color: var(--danger); }

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

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .digit-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  
.brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-logo {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 22px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  padding: 8px;
}

.hero {
    flex-direction: column;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .digit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two {
    grid-template-columns: 1fr;
  }
}