* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1e2530;
  color: #f1f2f6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  max-width: 960px;
  width: 100%;
}
.motivatingText{
  margin-top: 10px;
  font-style: italic;
}

 .btn-back{
  position: fixed;
  top: 10px;
  left: 100px;
  background-color: #34495e;
  color: #ffffff;
  padding: 6px 14px;

 }
 .btn-back:hover {
  background-color: #7f8c8d; 
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background-color: #2b3545;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.title-area h1 {
  font-size: 1.5rem;
  color: #ff9f43;
}

.title-area h1 span {
  font-size: 0.85rem;
  color: #a4b0be;
  font-weight: normal;
  margin-left: 8px;
}

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

.hud-item {
  font-size: 1rem;
}

.hud-label {
  color: #a4b0be;
  margin-right: 5px;
}

.hud-value {
  color: #10ac84;
  font-weight: bold;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-restart {
  background-color: #ee5253;
  color: #ffffff;
}

.btn-restart:hover {
  background-color: #ff6b6b;
}

.btn-mute {
  background-color: #f39c12; 
  color: #ffffff;
}

.btn-mute:hover {
  background-color: #f1c40f; 
}

.btn-muted-state {
  background-color: #7f8c8d !important; 
}

.canvas-wrapper {
  position: relative;
  border: 4px solid #3d4a5d;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  background-color: #0c1017;
}

#gameCanvas {
  display: block;
  cursor: crosshair;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  gap: 15px;
}

.guide-box {
  flex: 2;
  background-color: #2b3545;
  padding: 12px 18px;
  border-radius: 8px;
  border-left: 4px solid #54a0ff;
  font-size: 0.9rem;
}

.guide-box h3 {
  margin-bottom: 8px;
  color: #54a0ff;
  font-size: 1rem;
}

.guide-box ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.guide-box li strong {
  color: #c8d6e5;
}

.tip-box {
  flex: 1;
  background-color: #2b3545;
  padding: 12px 18px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-style: italic;
  color: #ff9f43;
  border-left: 4px solid #ff9f43;
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

.win-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(5, 8, 17, 0.78);
}

.win-card {
  width: min(420px, 100%);
  padding: 32px;
  text-align: center;
  background-color: #2b3545;
  border: 2px solid #f1c40f;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.win-card h2 {
  margin-bottom: 18px;
  color: #f1c40f;
}

.win-card p {
  margin: 8px 0;
  color: #c8d6e5;
}

.win-card .btn {
  margin-top: 20px;
  background-color: #10ac84;
  color: #ffffff;
}

.win-card .btn:hover {
  background-color: #1dd1a1;
}

.home-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("images/background.png");
  background-size: cover;
  background-position: center;
}


.difficulty-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.diff-label {
  font-size: 0.9rem;
  color: #a4b0be;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-diff {
  background-color: #2b3545;
  color: #c8d6e5;
  border: 2px solid #3d4a5d;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-diff:hover {
  border-color: #54a0ff;
  color: #ffffff;
}

.btn-diff[data-level="easy"].active {
  background-color: #10ac84;
  border-color: #1dd1a1;
  color: #ffffff;
}

.btn-diff[data-level="medium"].active {
  background-color: #e67e22;
  border-color: #f39c12;
  color: #ffffff;
}

.btn-diff[data-level="hard"].active {
  background-color: #ee5253;
  border-color: #ff6b6b;
  color: #ffffff;
}

.quote-overlay {
  position: fixed;
  inset: 0;
  z-index: 15; 
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 1;
  transition: opacity 2s ease-in-out; 
}

.quote-overlay.fade-out {
  opacity: 0; 
}

.quote-text {
  color: #ffffff;
  font-size: 1.5rem;
  font-style: italic;
  text-align: center;
  line-height: 1.6;
  letter-spacing: 1px;
  max-width: 600px;
}

.home-content {
  text-align: center;
  padding: 40px 60px;
  background-color: rgba(11, 15, 23, 0.55);
  border-radius: 14px;
  backdrop-filter: blur(2px);
}

.home-content h1 {
  font-size: 40px;
  color: #ff9f43;
  margin-bottom: 8px;
}

.home-content p {
  color: #c8d6e5;
  margin-bottom: 24px;
  font-size: 16px;
}

.btn-play {
  background-color: #150b30;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 12px 32px;
}

.btn-play:hover {
  background-color: #241c6e;
}