/* ===== GLOBAL ===== */
:root {
  --primary-color: #a7f3d0;
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --card-bg: #1f2937;
  --border-color: #374151;
  --text-primary: #d4d4d8;
  --text-secondary: #9ca3af;
  --gap: 24px;
  --border-radius: 12px;
  --shadow: 0 2px 8px rgba(31, 41, 55, 0.3);
  --shadow-hover: 0 4px 16px rgba(167, 243, 208, 0.15);
  --banner-height: 30px;
  --header-height: 48px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  background-attachment: fixed;
  /* ✅ content starts just below banner + header */
  padding-top: calc(var(--banner-height) + var(--header-height));
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
}

/* ===== BANNER ===== */
.banner {
  width: 100%;
  height: var(--banner-height);
  text-align: center;
  background: var(--card-bg);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.banner a:hover {
  border-bottom-color: var(--primary-color);
}

/* ===== HEADER ===== */
header.header {
  position: fixed;
  top: var(--banner-height); /* sits right below banner */
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}
header .logo {
  height: 30px;
  border-radius: var(--border-radius);
  transition: transform 0.2s ease;
}
header .logo:hover {
  transform: scale(1.05);
}

/* ===== NAV LINKS ===== */
nav.right a {
  color: var(--text-primary);
  text-decoration: none;
  margin-left: 16px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}
nav.right a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.2s ease;
}
nav.right a:hover {
  color: var(--primary-color);
}
nav.right a:hover::after {
  width: 100%;
}

/* ===== HEADINGS ===== */
h1 {
  font-size: clamp(24px, 3.5vw, 36px);
  margin: 8px 0;
  color: var(--primary-color);
  font-weight: 400;
  letter-spacing: 0.25px;
}
#tutorial {
  font-size: clamp(14px, 1.8vw, 16px);
  margin: 0 auto;
  max-width: 80%;
  opacity: 0.8;
  line-height: 1.4;
}

/* ===== HINTS SECTION ===== */
.hints-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  margin: 16px auto;
  max-width: 600px;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease;
}
.hints-container:hover {
  box-shadow: var(--shadow-hover);
}
.hints-container p {
  margin-bottom: 8px;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--primary-color);
}
.hints-container p:last-child {
  margin-bottom: 0;
}

/* ===== BUTTONS ===== */
button,
form button {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid #4b5563;
  background: #1f2937;
  color: #d4d4d8;
  font-size: clamp(13px, 1.5vw, 15px);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  display: inline-block;
  width: auto;
  max-width: 200px;
  margin: 8px auto;
}
button:hover {
  background: #374151;
  border-color: #6b7280;
}
button:active {
  transform: scale(0.98);
}

/* ===== FRED BUTTON ===== */
#fredHackButton {
  padding: 7px 14px;
  font-size: clamp(12px, 1.4vw, 14px);
  border-radius: 6px;
  background: #1f2937;
  color: #a7f3d0;
  border: 1px solid #6b7280;
}

/* ===== LAYOUT ===== */
.container {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 40px 6vw 60px;
  position: relative;
}
.container::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: #374151;
  transform: translateX(-50%);
}

/* ===== STOPWATCH ===== */
#stopwatch {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(60px, 7vw, 90px);
  height: clamp(60px, 7vw, 90px);
  border-radius: 50%;
  background: #111827;
  border: 1px solid #4b5563;
  color: #a7f3d0;
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: clamp(60px, 7vw, 90px);
  font-weight: 400;
}

/* ===== PLAYER SIDES ===== */
.player-side,
.fred-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: clamp(14px, 1.7vw, 18px);
}
#playerMoney,
#fredMoney,
#playerMPS,
#fredMPS {
  color: #d4d4d8;
  font-weight: 400;
}

/* ===== FORM ===== */
.toggleform {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1f2937;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #374151;
  z-index: 100;
}
.toggleform.show {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
form input {
  width: clamp(180px, 40vw, 220px);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #4b5563;
  background: #111827;
  color: #d4d4d8;
  font-size: clamp(14px, 1.6vw, 16px);
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease;
}
form input:focus {
  border-color: #6b7280;
}

/* ===== ALERT ===== */
#alerts {
  display: block;
  margin: 12px auto;
  padding: 10px 16px;
  border-radius: 8px;
  color: #f3f4f6;
  background: rgba(75, 85, 99, 0.2);
  font-size: clamp(15px, 1.9vw, 18px);
  font-weight: 400;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    gap: 30px;
    padding: 20px 4vw;
  }
  .container::before {
    display: none;
  }
  #tutorial {
    margin: 0 6vw;
    font-size: clamp(13px, 2.2vw, 15px);
  }
  .hints-container {
    margin: 12px auto;
    padding: 12px;
    max-width: 90%;
  }
}
/* ===== TITLE HEADER ===== */
.title-header {
  margin-top: 0px; /* small consistent gap below navbar */
}

