@font-face {
  font-family: 'EagleLake';
  src: url('../EagleLake-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: 'EagleLake', serif;
}

canvas {
  display: block;
  image-rendering: pixelated;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#level-time {
  font-size: 36px;
  font-weight: bold;
  margin: 15px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#new-best-time {
  display: none;
  color: #00ff33;
  font-size: 36px;
  font-weight: normal;
  margin: 15px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#time-display {
  position: absolute;
  top: 10px;
  left: 10px; /* Changed from right to left */
  color: white;
  font-size: 32px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

#sheep-counter {
  position: absolute;
  top: 0px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 90px;
  font-weight: bold;
  z-index: 1000;
  background: linear-gradient(to bottom,
    #ffff00 0%,
    #ffff00 80%,
    #ffff00 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 3px #8B4513;
  filter: brightness(1.4);
  text-shadow: 
    /* Outer glow */
    0 0 30px rgba(255, 255, 0, 0.9),
    /* Drop shadow */
    6px 6px 12px rgba(0, 0, 0, 1);
}

#level-display {
  position: absolute;
  top: 10px;
  right: 15px; /* Keep on right side */
  color: white;
  font-size:32px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

#start-screen, #level-screen, #game-over-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'EagleLake';
  z-index: 10;
}

#start-screen, #game-over-screen {
  background: none;
}

#start-screen::before, #game-over-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: -1;
}

#start-screen .content, #game-over-screen .content {
  width: 600px;
  height: 600px;
  background-image: url('assets/splash.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#start-screen h1, #game-over-screen h1 {
  margin: 0;
  margin-top: 260px;
  z-index: 1;
  font-size: 48px;
  position: relative;
  background: linear-gradient(to bottom,
    #ffff00 0%,
    #ffff00 80%,
    #ffff00 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 3px #8B4513;
  filter: brightness(1.4);
  text-shadow: 
    /* Outer glow */
    0 0 30px rgba(255, 255, 0, 0.9),
    /* Drop shadow */
    6px 6px 12px rgba(0, 0, 0, 1);
}

#start-screen h1::before, #game-over-screen h1::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
    #ffff00 0%,
    #ffff00 80%,
    #ffff00 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 3px #8B4513;
  filter: brightness(1.4);
  text-shadow: 6px 6px 12px rgba(0, 0, 0, 1);
}

#start-screen p, #game-over-screen p {
  margin: 10px 0;
  z-index: 1;
  color: white;
  text-shadow: 2px 2px #000000;
}

#game-over-screen .content {
  justify-content: flex-end;
  padding-bottom: 20px;
}

#game-over-screen h1 {
  margin-bottom: 10px;
}

#game-over-screen p {
  font-size: 24px;
  margin-bottom: 20px;
}

#level-screen .content {
  background: radial-gradient(circle at center, #4a90e2 0%, #2c3e50 100%);
  padding: 30px;
  border-radius: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 400px;
  min-height: 400px;
  border: solid 2px #fff;
  box-shadow: 0 0 15px #fff;
}

#level-screen h1 {
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  margin-bottom: 20px;
  margin-top: 0;
  font-size: 32px;
}

#level-screen .score-breakdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0;
  color: white;
  font-size: 24px;
  width: 100%;
}

#level-screen .score-breakdown .score-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
  gap: 10px;
  width: 100%;
  font-size: 28px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#level-screen .score-breakdown .score-line span {
  min-width: 200px;
  text-align: left;
  color: white;
}

/* Target specifically the wolf penalties line */
#level-screen .score-breakdown .score-line.wolf-penalty span {
  color: #ff6b6b;
}

#level-screen .score-breakdown .sheep-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

#level-screen .score-breakdown .total-score {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  background: linear-gradient(to bottom,
    #ffff00 0%,
    #ffff00 80%,
    #ffff00 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 3px #8B4513;
  filter: brightness(1.4);
  text-shadow: 
    /* Outer glow */
    0 0 30px rgba(255, 255, 0, 0.9),
    /* Drop shadow */
    6px 6px 12px rgba(0, 0, 0, 1);
}

#level-screen p {
  margin: 8px 0;
  font-size: 24px;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#level-screen h1::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 5px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8), transparent);
}

#start-button {
  padding: 10px 20px;
  font-size: 24px;
  cursor: pointer;
  background-color: #c31798;
  color: white;
  border: none;
  border-radius: 5px;
  box-shadow: 0 4px #590c30;
  font-family: 'EagleLake';
  transition: all 0.1s;
  position: static;
  text-shadow: 2px 2px #333;
  margin-top: 50px;
}

#restart-button {
  padding: 10px 20px;
  font-size: 24px;
  cursor: pointer;
  background-color: #c31798;
  color: white;
  border: none;
  border-radius: 5px;
  box-shadow: 0 4px #590c30;
  font-family: 'EagleLake';
  transition: all 0.1s;
  position: static;
  text-shadow: 2px 2px #333;
  margin-bottom: 50px;
}

#next-level-button {
  padding: 10px 20px;
  font-size: 24px;
  cursor: pointer;
  background-color: #c31798;
  color: white;
  border: none;
  border-radius: 5px;
  box-shadow: 0 4px #590c30;
  font-family: 'EagleLake';
  transition: all 0.1s;
  position: static;
  text-shadow: 2px 2px #333;
  margin-top: 50px;
  margin-bottom: 50px;
}

#start-button:active, #restart-button:active, #next-level-button:active {
  box-shadow: 0 2px #3D8B40;
  transform: translateY(2px);
}

#start-button:hover, #next-level-button:hover, #restart-button:hover {
  background-color: #ff4ae3;
} 