/* file: stylejeem.css */

*{
  box-sizing:border-box;
}

html{
  -webkit-text-size-adjust:100%;
}

html, body{
  margin:0;
  padding:0;
  width:100%;
  min-height:100%;
}

.word-svg{
  width:100%;
  height:100%;
  display:block;
  overflow:visible;
  position:relative;
  z-index:2;
}

body{
  font-family:'Baloo Bhaijaan 2', cursive;
  text-align:center;
  background:url("assets/jeemimg/background.webp") center/cover no-repeat fixed;
  color:#4a2340;
}

.container{
  min-height:100svh;
  max-width:1360px;
  margin:0 auto;
  padding:18px 24px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:12px;
}

.main-title{
  margin:0 auto 8px;
  font-size:28px;
  line-height:1.2;
  background:#ffffff;
  padding:8px 18px;
  border-radius:14px;
  display:inline-block;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}

.card{
  width:100%;
  background:rgba(255,255,255,.95);
  border-radius:30px;
  padding:22px 26px;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

.screen-card{
  max-width:860px;
  margin:0 auto;
}

.game-card{
  max-width:1220px;
  margin:0 auto;
  min-height:560px;
  padding:26px 26px 20px;
  display:flex;
  align-items:center;
}

.hidden{
  display:none !important;
}

h2{
  margin:0 0 8px;
  font-size:34px;
  line-height:1.25;
}

h3{
  margin:8px 0;
}

p{
  margin:8px 0;
  font-size:27px;
  line-height:1.5;
}

.instruction-text{
  max-width:700px;
  margin:8px auto 0;
}

.instruction-status{
  margin-top:12px;
  font-size:22px;
  color:#7a3c62;
}

input{
  width:min(340px, 90%);
  height:58px;
  font-size:28px;
  font-family:'Baloo Bhaijaan 2', cursive;
  text-align:center;
  border:3px solid #4a9df8;
  border-radius:18px;
  padding:8px 16px;
  background:#fff;
  outline:none;
}

input:focus{
  border-color:#d86fa7;
  box-shadow:0 0 0 4px rgba(242,139,183,.15);
}

button{
  min-width:130px;
  min-height:56px;
  font-size:28px;
  font-family:'Baloo Bhaijaan 2', cursive;
  border:none;
  border-radius:18px;
  padding:10px 22px;
  cursor:pointer;
  color:#fff;
  background:#4a9df8;
  box-shadow:0 6px 12px rgba(0,0,0,.14);
  transition:transform .2s ease, background .2s ease, opacity .2s ease;
}

button:hover{
  transform:translateY(-2px) scale(1.02);
  background:#2f80ed;
}

button:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  background:#6fb4fb;
}

.action-row{
  margin-top:18px;
}

.start-btn{
  min-width:170px;
}

.instruction-buttons{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  margin-top:18px;
}

.game-layout{
  width:100%;
  display:grid;
  grid-template-columns:220px 1fr;
  gap:34px;
  align-items:center;
}

.sidebar-wrap{
  display:flex;
  flex-direction:column;
  gap:14px;
  background:linear-gradient(180deg,#d6ecff 0%, #bfe2ff 50%, #a8d8ff 100%);
  border:4px solid #4a9df8;
  border-radius:30px;
  padding:14px 12px;
  box-shadow:
    0 12px 24px rgba(0,0,0,.08),
    inset 0 2px 0 rgba(255,255,255,.55);
}

.game-badge,
.info-box{
  background:#fff8fc;
  border:3px solid #4a9df8;
  color:#1c5ecf;
  border-radius:20px;
  box-shadow:0 4px 10px rgba(0,0,0,.05);
}

.game-badge{
  padding:14px 10px;
  font-size:22px;
  line-height:1.5;
  font-weight:700;
  background:#fffdfd;
}

.info-box{
  padding:16px 14px;
  font-size:21px;
  line-height:1.4;
  font-weight:700;
}

.welcome-box{
  font-size:23px;
  background:#fff;
}

.stats-line{
  text-align:center;
}

.play-area{
  min-width:0;
  display:grid;
  grid-template-rows:auto auto auto;
  gap:40px;
  align-content:center;
  justify-items:center;
}

.question-row{
  width:100%;
  display:grid;
  grid-template-columns:260px 1fr;
  gap:34px;
  align-items:center;
  justify-content:center;
  max-width:760px;
}

.sprite-frame{
  width:260px;
  height:260px;
  overflow:hidden;
  border:4px solid #2f80ed;
  box-shadow:0 0 18px rgba(47,128,237,0.35);
  border-radius:24px;
  position:relative;
  background:#fff;
  justify-self:center;
}

.sprite{
  position:absolute;
  width:1280px;
  height:512px;
  background:url("assets/jeemimg/atlasjeem.webp");
  background-size:1280px 512px;
  background-repeat:no-repeat;
  transform-origin:top left;
}

.word-audio-wrap{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  width:100%;
}

.word-line{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  width:100%;
}

.word-box{
  font-size:58px;
  background:#ecdd8a;
  padding:10px 24px;
  border-radius:22px;
  min-width:300px;
  height:108px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}

.listen-btn{
  width:58px;
  min-width:58px;
  height:58px;
  border-radius:50%;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  background:#8ec5ff;
  color:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,.12);
}

.listen-btn:hover{
  background:#6fb4fb;
}

.choices{
  width:100%;
  max-width:760px;
  display:grid;
  grid-template-columns:repeat(4, 120px);
  justify-content:center;
  gap:18px;
  margin-top:10px;
}

.choices button{
  width:120px;
  height:60px;
  font-size:38px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  border:none;
  background:linear-gradient(180deg,#6fb4fb,#2f80ed);
  box-shadow:0 6px 0 #1c5ecf, 0 10px 16px rgba(0,0,0,0.15);
  cursor:pointer;
  transition:transform 0.15s ease, box-shadow 0.15s ease;
}

.choices button:hover{
  transform:translateY(-3px);
}

.choices button:active{
  transform:translateY(3px);
  box-shadow:0 2px 0 #c6538a, 0 4px 8px rgba(0,0,0,0.15);
}

#feedback{
  width:100%;
  max-width:760px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  font-weight:700;
  margin:0;
}

.stars-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:visible;
  z-index:5;
}

.star{
  position:absolute;
  font-size:24px;
  animation:starFloat 900ms ease-out forwards;
  opacity:0;
}

@keyframes starFloat{
  0%{
    transform:translate(-50%, -50%) scale(.35);
    opacity:0;
  }
  20%{
    opacity:1;
  }
  100%{
    transform:translate(calc(-50% + var(--moveX)), calc(-50% + var(--moveY))) scale(1.15);
    opacity:0;
  }
}

.result-layout{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:20px;
  margin:14px 0;
  flex-wrap:wrap;
}

.medal-box{
  display:flex;
  align-items:center;
  justify-content:center;
}

.medal{
  font-size:84px;
}

.result-info{
  text-align:right;
  font-size:24px;
  line-height:1.8;
}

/* file: stylejeem.css */

/* file: stylejeem.css */

.word-display-text{
  direction: rtl;
  unicode-bidi: plaintext;
  white-space: nowrap;
  color: #000;
  line-height: 1;
}

.word-display-text span{
  display: inline;
}

.highlighted-char{
  color: #e53935;
}

@media (max-width: 1100px){
  .game-layout{
    grid-template-columns:200px 1fr;
    gap:22px;
  }

  .question-row{
    grid-template-columns:220px 1fr;
    gap:22px;
    max-width:680px;
  }

  .sprite-frame{
    width:220px;
    height:220px;
  }

  .word-box{
    min-width:250px;
    height:94px;
    font-size:46px;
  }

  .choices{
    max-width:680px;
    grid-template-columns:repeat(4, minmax(90px, 1fr));
  }

  .choices button{
    width:100%;
    height:54px;
    font-size:32px;
  }
}

@media (max-width: 980px){
  .container{
    min-height:auto;
    justify-content:flex-start;
    padding:12px;
  }

  .game-card{
    display:block;
    min-height:auto;
    padding:14px;
  }

  .game-layout{
    grid-template-columns:1fr;
    gap:18px;
  }

  .sidebar-wrap{
    width:100%;
    max-width:560px;
    margin:0 auto;
  }

  .play-area{
    gap:16px;
    align-content:start;
  }

  .question-row{
    grid-template-columns:1fr;
    gap:18px;
    max-width:none;
  }

  .word-audio-wrap,
  .word-line{
    justify-content:center;
  }

  .choices{
    max-width:none;
    grid-template-columns:repeat(2, minmax(120px, 170px));
    justify-content:center;
  }

  #feedback{
    max-width:none;
  }
}

@media (max-width: 768px){
  body{
    background-attachment:scroll;
  }

  .game-layout{
    display:flex;
    flex-direction:column;
    gap:22px;
  }

  .play-area{
    order:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:22px;
  }

  .question-row{
    order:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:18px;
  }

  .sprite-frame{
    order:1;
    width:240px;
    height:240px;
  }

  .word-line{
    order:2;
    justify-content:center;
  }

  .word-box{
    font-size:52px;
    min-width:260px;
    height:100px;
  }

  .listen-btn{
    width:60px;
    height:60px;
    font-size:28px;
  }

  .choices{
    order:3;
    grid-template-columns:repeat(2, 1fr);
    gap:16px;
  }

  .choices button{
    height:70px;
    font-size:42px;
  }

  #feedback{
    order:4;
    font-size:24px;
  }

  .sidebar-wrap{
    order:2;
    width:100%;
    max-width:420px;
    margin:0 auto;
  }

  .game-badge{
    display:none;
  }
}

@media (max-width: 480px){
  .container{
    padding:10px;
    gap:8px;
  }

  .main-title{
    font-size:18px;
    padding:7px 14px;
  }

  input{
    height:54px;
  }

  button{
    min-height:52px;
    padding:8px 16px;
  }

  .instruction-buttons{
    flex-direction:column;
    gap:10px;
  }

  .word-line{
    flex-direction:row;
    gap:10px;
  }

  .word-box{
    min-width:180px;
    font-size:60px;
  }

  .choices{
    grid-template-columns:repeat(2, 1fr);
  }

  .medal{
    font-size:72px;
  }
}

@media (min-width: 769px) and (max-width: 1100px){
  .game-layout{
    display:flex;
    flex-direction:column;
    gap:28px;
  }

  .play-area{
    order:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:28px;
  }

  .question-row{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:22px;
  }

  .sprite-frame{
    width:320px;
    height:320px;
  }

  .word-box{
    font-size:64px;
    min-width:340px;
    height:120px;
  }

  .listen-btn{
    width:70px;
    height:70px;
    font-size:32px;
  }

  .choices{
    grid-template-columns:repeat(4, 140px);
    gap:20px;
  }

  .choices button{
    height:80px;
    font-size:46px;
  }

  .sidebar-wrap{
    order:2;
    width:100%;
    max-width:600px;
    margin:0 auto;
  }

  .game-badge{
    display:none;
  }
}