/* --- Base Styles (Mobile Optimized) --- */
body, html {
  margin: 0;
  padding: 0;
  height: 100dvh; /* Dynamic Height for Mobile Browsers */
  width: 100vw;
  font-family: 'Press Start 2P', cursive; 
  font-size: 12px; /* Base font chota kiya */
  line-height: 1.2; 
  background: linear-gradient(to bottom, #0f172a, #000);
  color: white;
  overflow: hidden; 
  touch-action: none; 
  display: flex;
  justify-content: center;
}

#game {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  
  /* ✅ PC FIX: Max-width wapas lagayi taaki PC par game bohot chaura na ho */
  max-width: 500px; 
  
  height: 100%;
  padding: 0; 
  box-sizing: border-box;
  position: relative;
  
  /* PC par thoda sa border dikhane ke liye (Optional) */
  border-left: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.1);
}

/* --- COMPACT Game Title --- */
#game-title {
  text-align: center;
  margin-top: 5px;   /* Margin 10px se 5px kiya */
  margin-bottom: 2px; /* Margin kam kiya */
  flex-shrink: 0;    /* Isko shrink hone se roka, lekin size chota rakha */
}

#game-title h1 {
  margin: 0;
  font-size: 20px; /* 28px se 20px kiya (JAGAH BACHAYI) */
  font-weight: normal; 
  letter-spacing: 2px;
  background: linear-gradient(to right, #06b6d4, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* --- COMPACT Stats Bar --- */
#stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 0; /* Margin bilkul khatam */
  background: rgba(0, 0, 0, 0.6);
  border-radius: 0; 
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  padding: 5px 0; /* Padding 8px se 5px ki */
  flex-shrink: 0; /* Isko shrink hone se roka */
}

.stat-box {
  text-align: center;
  min-width: 60px;
}

.label {
  font-size: 8px; /* Label chota kiya */
  color: #aaa;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.stat-box div:nth-child(2){
  font-size: 14px; /* Score font 18px se 14px kiya */
  font-weight: normal;
  color: #fff;
  text-shadow: 0 0 5px cyan; 
}

/* --- EXPANDED Game Container --- */
#game-container {
  position: relative;
  width: 100%;
  flex-grow: 1; /* ✅ JADOO: Bachi hui saari jagah ye le lega */
  background: linear-gradient(to bottom, #000000, #0f172a);
  border: none;
  overflow: hidden;
  margin: 0;
}

.column-line {
  position: absolute;
  top:0;
  bottom:0;
  width: 1px;
  background: rgba(255,255,255,0.1);
}

/* --- Tiles --- */
.tile {
  position: absolute;
  border-radius: 4px; /* Thoda radius kam kiya */
  text-align: center;
  font-size: 20px; 
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  /* Remove transition to make it feel snappier on mobile */
}

.tile:active {
    transform: scale(0.95);
}

/* --- Menu and Game Over --- */
#menu, #game-over {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.95); 
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  z-index: 100;
  padding: 20px;
}

#menu h1, #game-over h1 {
  font-size: 22px; 
  color: #fff;
  text-align: center;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button {
  padding: 12px 25px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px; 
  border: none;
  border-radius: 50px; 
  cursor: pointer;
  color: white;
  background: linear-gradient(to right, #06b6d4, #3b82f6);
}
