body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  display: flex;
  justify-content: center;
  font-family: "Segoe UI", sans-serif;
  align-items: center;
}

#game-wrapper {
  position: relative;
  width: 512px;
  height: 640px;
  overflow: hidden;
}

#input_video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

canvas {
  position: relative;
  display: block;
  z-index: 2;
  background: #1a1a1a;
  width: 100%;
  height: 100%;
}

#countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 130px;
  font-weight: 900;
  color: #f1c40f;
  z-index: 30;
  display: none;
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.stats {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
  z-index: 15;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 25px;
  border-radius: 50px;
  color: #fff;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
}

.icon-score {
  content: url("img/apple.png");
  width: 24px;
}

.icon-timer {
  content: url("img/hourglass.png");
  width: 24px;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  color: white;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

#overlay img.logo {
  width: 60%;
  max-width: 300px;
  margin-bottom: 25px;
}

#overlay img.start-btn {
  width: 50%;
  max-width: 250px;
  cursor: pointer;
  transition: transform 0.3s;
}

#overlay img.start-btn:hover {
  transform: scale(1.05);
}

#brandSelect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 25;
  color: white;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

#brandSelect h2 {
  color: #f1c40f;
  text-transform: uppercase;
  margin-bottom: 25px;
}

.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  max-width: 340px;
}

.brand-logo {
  width: 150px;
  padding: 15px;
  background: #fff;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.3s;
}

.brand-logo:hover {
  transform: scale(1.05);
}

h1 {
  font-size: 34px;
  color: #f1c40f;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.icon-trophy {
  content: url("img/trophy.png");
  width: 35px;
  vertical-align: middle;
}

button {
  padding: 14px 45px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  background: #f1c40f;
  border: none;
  border-radius: 50px;
  margin-top: 25px;
  color: #000;
  transition: 0.3s;
}

button:hover {
  background: #fff;
  transform: scale(1.05);
}

.leaderboard {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 15px;
  width: 85%;
  margin: 25px 0;
}

.score-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
