/* style.css */

:root {
  --bg-color: #2e2e2e;
  --main-color: #3a3a3a;
  --shadow-light: #474747;
  --shadow-dark: #212121;
  --text-color: #d0d0d0;
  --text-light: #9a9a9a;
  --positive-color: #a6c0a6;
  --positive-glow: #849d84;
  --negative-color: #c08586;
  --negative-glow: #985757;
  --border-radius: 16px;
  --transition-speed: 0.3s;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: 440px;
  background: var(--main-color);
  border-radius: var(--border-radius);
  padding: 3rem 2.5rem;
  box-shadow: 9px 9px 15px var(--shadow-dark), -9px -9px 15px var(--shadow-light);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.date {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.box {
  width: 100%;
  background: var(--main-color);
  border-radius: var(--border-radius);
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.8rem;
  text-align: center;
  user-select: none;
  transition: box-shadow var(--transition-speed);
}

.box:hover {
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
}

.pnl-box {
  font-weight: 800;
  font-size: 3.2rem;
}

.stats-row {
  display: flex;
  gap: 2rem;
  width: 100%;
  margin-bottom: 2rem;
}

.stat-box {
  flex: 1 1 50%;
  background: var(--main-color);
  border-radius: var(--border-radius);
  box-shadow: 7px 7px 15px var(--shadow-dark), -7px -7px 15px var(--shadow-light);
  padding: 1.25rem 0;
  font-weight: 700;
  font-size: 2.4rem;
  text-align: center;
  user-select: none;
  cursor: pointer;
}

.stat-box.tp {
  color: var(--positive-color);
  text-shadow: 0 0 10px var(--positive-glow);
}

.stat-box.sl {
  color: var(--negative-color);
  text-shadow: 0 0 10px var(--negative-glow);
}

.winrate {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  width: 100%;
  margin-bottom: 3rem;
}

.error {
  background: var(--main-color);
  color: var(--negative-color);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: 7px 7px 15px var(--shadow-dark), -7px -7px 15px var(--shadow-light);
}

.date-form {
  width: 100%;
  margin-bottom: 1.5rem;
}

.date-row {
  display: flex;
  width: 100%;
  gap: 0.75rem;
  align-items: center;
}

.date-input {
  flex: 1;
  padding: 0.5rem;
  font-size: 1rem;
  background: var(--main-color);
  color: var(--text-color);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 30, 30, 0.92);
  z-index: 10;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #333;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 16px #000a;
  padding: 1.5rem;
  position: relative;
  width: 95%;
  max-width: 360px;
}

.modal-content h2 {
  color: #eee;
  margin: 0 0 1rem;
  text-align: center;
}

.modal-content canvas {
  width: 100% !important;
  height: auto !important;
}

.closeBtn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  color: #bbb;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
}

.list-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--main-color);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px var(--shadow-dark), 0 2px 10px var(--shadow-light);
  z-index: 20;
}

.list-modal h3 {
  margin: 0 0 0.5rem;
  color: var(--text-light);
}

.list-modal ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}



@media (max-width: 480px) {
  .pnl-box { font-size: 2.6rem; }
  .stat-box { font-size: 1.8rem; padding: 1rem 0; }
  .date-input { padding: 0.4rem; font-size: 0.95rem; }
}
