
       
        * { box-sizing: border-box; margin: 0; padding: 0; }
        html, body { width: 100%; height: 100%; font-family: Arial, sans-serif; background: #ffffff; }
        .container { display: flex; height: 100vh; align-items: center; justify-content: center; }
        .canvas-container { position: relative; width: 100%; max-width: 500px; height: 100svh; background: #000; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
      @media (max-width: 450px) {
  .canvas-container {
    width: 100vw;      
    height: 100svh;     
    max-width: none;    
  }

  html, body {
    margin: 0;
    padding: 0;
 
  }
 
  .canvas-container canvas {
    width: 100%;
    height: 100%;
  }
}
        canvas { display: block; width: 100%; height: 100%; background: transparent; }
   
        .hud { position: absolute; top: 5px; left: 10px; color: #fff; font-size: 16px; background: rgba(0, 0, 0, 0.5); padding: 4px 8px; border-radius: 4px; }
        .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.2rem; z-index: 10; animation: fadeIn 2s ease-out; }
        .overlay.hidden { display: none; }
        .overlay .options { margin-bottom: 15px; }
        .overlay label { margin-right: 12px; cursor: pointer; }
        .overlay button { padding: 10px 16px; background: #4a90e2; border: none; border-radius: 6px; color: #fff; cursor: pointer; transition: background 0.2s; font-size: 2rem; margin: 5px; }
        .overlay button:hover { background: #ec1414; }
        .level-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.5rem; z-index: 20; }
        .level-overlay.hidden { display: none; }
        .level-overlay button { margin-top: 15px; padding: 8px 14px; font-size: 1rem; }
    @keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.title-animate {
    background: linear-gradient(180deg, #acd300, #ffffff);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
}
.title-animate, .subtitle-animate {
    animation: fadeIn 2s ease-out;
}

.title-animate {
  font-size: clamp(3rem, 20vw, 12rem) !important;

}


.subtitle-animate {
  font-size: clamp(1.5rem, 10vw, 4rem) !important;
}


.overlay button,
.level-overlay button {
  font-size: clamp(1rem, 5vw, 2.5rem);
  padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 2rem);
}


.overlay .options {
  font-size: clamp(1rem, 4vw, 2rem);
}

#gameOverText {
  font-size: clamp(1.2rem, 6vw, 3rem);
  text-align: center;
  line-height: 1.2;
}


#levelText {
  font-size: clamp(1.2rem, 6vw, 3rem);
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 767px) {
 
  #startOverlay > div {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100%;
    text-align: center;
  }

  
  .title-animate {
    font-size: clamp(4rem, 25vw, 10rem) !important;
    text-align: center;
    color: #ffffff; 
  }

 
  .subtitle-animate {
    font-size: clamp(2rem, 15vw, 6rem) !important;
    text-align: center;
    color: #ffffff;
    margin-top: 0.2em !important;
  }
}

#homeBackground {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.options {
    font-size: 30px;
    margin-top: -120px;
    color: red;
}

 .options input[type="radio"] {
        transform: scale(1.5); 
        margin-right: 8px;
    }

    

   
@keyframes slideUp {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-200%); opacity: 0; }
}
.slide-up {
  animation: slideUp 0.6s ease-out forwards;
}


@keyframes slideDown {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(200%); opacity: 0; }
}
.slide-down {
  animation: slideDown 0.6s ease-out forwards;
}


@keyframes curtainOpen {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
#curtain {
    display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 30;
  transform: translateY(0);
  pointer-events: none;
}
#curtain.open {
    display: block;
  animation: curtainOpen 0.8s ease-in-out forwards;
}

#hiddenInput {
  display: none;
}


@media (max-width: 1024px) {
#hiddenInput {
    display: inline-block;
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  border: none;
  outline: none;
}
}


#virtualKeyboard {
  display: none;
}


@media only screen and (max-width: 768px),
       only screen and (pointer: coarse) {
          .canvas-container {
    width: 100vw;
    height: 100vh;  /* 100% of dynamic viewport height */
    position: relative;
  }

  /* गेम कैनवास को कंटेनर से कीबोर्ड की ऊँचाई घटाकर सेट करें */
  #gameCanvas {
    width: 100%;
    height: calc(100%); 
  }
 #virtualKeyboard {
    position: relative;      
    bottom: 0;   
    margin: 10px auto 0 auto;   
    left: 0;                     
    transform: none;
    width: 100%;
    max-width: 500px;
    background: rgba(0,0,0,0.75);
    display: none;            
    flex-direction: column;
    gap: 12px;
    padding: 5px 0;
    margin-top: 0;
    box-sizing: border-box;
    z-index: auto;              
   
  }

  #virtualKeyboard .vk-row {
    display: flex;
    justify-content: space-around;
    width: 100%;
  }
  #virtualKeyboard .vk-row:nth-child(1) { justify-content: space-evenly; }
  #virtualKeyboard .vk-row:nth-child(2) {
    width: 88%; margin: 0 auto; justify-content: space-between;
  }
  #virtualKeyboard .vk-row:nth-child(3) {
    width: 76%; margin: 0 auto; justify-content: space-between;
  }
  #virtualKeyboard button {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #04e9f1;
    font-size: 1.2em;
    flex: 1;
    margin: 0 4px;
    padding: 8px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.1s;
  }
  #virtualKeyboard button:hover { background: rgba(255,255,255,0.1); }
  #virtualKeyboard button:active {
    background: rgba(255,255,255,0.15);
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    color: #fff;
  }
}


  