body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", sans-serif;
    box-sizing: border-box;
}
#helperBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: grab;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    touch-action: none;
    animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,255,0, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0,255,0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0,255,0, 0); }
}
#helper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
#helper a {
    color: white;
    font-size: 24px;
    text-decoration: none;
    margin: 10px;
}
#helper a i {
    margin-right: 6px;
}
#helper a:hover {
    text-decoration: underline;
}
#closeBtn {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 52px;
    cursor: pointer;
}
.directories {
    background-color: #fff;
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 2 columns */
    grid-template-rows: repeat(2, 1fr);    /* 2 rows */
}
.directories a {
    text-decoration: none;
}
.directories a i {
    margin-right: 6px;
}
.box {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 16px;
    margin: 8px;
}
.box:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}
.box0 {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #131313;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: crosshair;
}
.box1 {
    background: linear-gradient(135deg, #A7C7E7, #90CAF9);
    padding: 20px;
}
.box2 {
    background: linear-gradient(135deg, #B2DFDB, #A5D6A7);
    padding: 40px;
}
.box3 {
    background: linear-gradient(135deg, #cec67e, #FFE082);
    padding: 60px;
}
.box4 {
    background: linear-gradient(135deg, #F8BBD0, #F48FB1);
    padding: 80px;
}
.box5 {
    background-color: cadetblue;
    cursor: pointer;
    gap: 15px;
}
.control-btn {
    background: #fff;
    border: none;
    border-radius: 18px;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
}
.control-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}
.vocab {
    width: 100%;
    text-align: center;
    align-items: center;
}
.info {
    padding: 12px;
    width: 50%;
    margin: 0 auto;
    text-align: left;
    color: #fff;
    background-color: #2196F3;
    border-radius: 18px;
    opacity: 1;
    transition: opacity 0.6s;
}
.closebtn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    float: right;
    font-size: 26px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
}
.closebtn:hover{
    color: #333;
}
.vocab_head {
    text-align: left;
    padding: 12px;
    color: #051765;
    padding-left: 18px;
}
.step1 {
    background-color: #f4ecd8;
    color: #333333;
    font-size: 3rem;
    border-radius: 12px;
    width: 50%;
    margin: 0 auto;
    margin-top: 40px;
}
.step1 p{
    padding: 12px;
    margin: 0;
}
.Adescription {
    font-weight: 700; /* make it bold */
    font-size: 1rem; /* slightly larger */
    text-transform: uppercase; /* make it stand out */
    background: linear-gradient(90deg, #c80000, #00e5ff); /* green to cyan gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px; /* spacing for elegance */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2); /* subtle shadow */
    padding-right: 30px;
}
.listenButton {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}
.listenButton button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 5px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.listenButton button:hover {
    background: #45a049;
}
.listenButton a {
    display: block;
    margin-top: 10px;
    color: #007BFF;
    text-decoration: none;
}
.listenButton a:hover {
    text-decoration: underline;
}
.controls {
    margin-top: 10px;
}
.controls button {
    background: #f0f0f0;
    color: #333;
    padding: 10px 15px;
    border-radius: 50%;
    border: none;
    margin: 0 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.controls button:hover {
    background: #ddd;
}
/*after 20 audio this page appears quiz mode*/
#nextDiv {
    display: none;
}
.step1_vocabQuiz {
    max-width: 600px;
    margin: auto;
    text-align: center;
    padding: 20px;
}

.step1Quiz {
    background-color: #f4ecd8;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 15px;
    margin: 10px auto;
    transition: all 0.5s ease;
}

.step1Quiz.active {
    display: block;
}

.listenButtonQuiz {
    margin-top: 20px;
}

.controlsQuiz button {
    margin: 0 5px;
    padding: 5px 10px;
}

.finished-messageQuiz {
    display: none;
    background: #d9f9d9;
    color: #0a730a;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    font-weight: bold;
}

.finished-messageQuiz.show {
    display: block;
}
.step1Quiz {
    display: none;
}
.step1Quiz.active {
    display: flex;
}

@media only screen and (max-width: 768px) {
  .directories {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    height: auto;
  }

  .box, .box0, .box5 {
    font-size: 1.2rem;
    padding: 10px;
    flex-direction: column;
    text-align: center;
  }

  .control-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .step1, .step1_vocabQuiz {
    width: 95%;
    font-size: 1.5rem;
  }

  .info {
    width: 95%;
    font-size: 1rem;
    padding: 8px;
  }

  .listenButton button {
    font-size: 14px;
    padding: 10px 12px;
  }

  .controls button,
  .controlsQuiz button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .step1Quiz {
    font-size: 0.95rem;
    padding: 10px;
  }

  #helperBtn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    bottom: 15px;
    right: 15px;
  }

  #closeBtn {
    top: 20px;
    right: 30px;
    font-size: 40px;
  }

  #helper a {
    font-size: 18px;
  }
}

/* 🧱 Extra Small Screens (e.g. 320px) */
@media only screen and (max-width: 500px) {
  .box, .box0, .box5 {
    font-size: 1.5rem;
    padding: 6px;
  }

  .salmanLogoimg {
    max-width: 60%;
  height: auto;
  display: block;
  margin: 0 auto;
  }

  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .listenButton button {
    font-size: 13px;
    padding: 8px 10px;
  }

  .step1, .step1_vocabQuiz, .info {
    font-size: 0.9rem;
    font-family: "Open Sans", sans-serif;
  }

  .step1Quiz p {
    font-size: 0.85rem;
  }

  #helperBtn {
    font-size: 18px;
    width: 45px;
    height: 45px;
  }

  #closeBtn {
    font-size: 36px;
  }

  #helper a {
    font-size: 16px;
  }
}

/*collapsible*/
.step1_vocab, .step2_vocab, .step3_vocab, .step4_vocab, .step5_vocab {
    border: none;
    border-radius: 8px;
    margin-bottom: 0.2rem;
    transition: max-height 0.3s ease;
  }

  .step1_vocab:not(.open) > div,
  .step2_vocab:not(.open) > div,
  .step3_vocab:not(.open) > div,
  .step4_vocab:not(.open) > div,
  .step5_vocab:not(.open) > div {
    display: none;
  }

  .vocab_head {
    background-color: #cfe0f1;
    border-radius: 8px;
    color: #333333;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    position: sticky;
    top: 0;
    padding: 5px;
  }

  @media screen and (max-width: 768px) {
    .step1_vocab, .step2_vocab, .step3_vocab {
      font-size: 0.95rem;
      padding: 0.5rem;
    }

    .vocab_head {
      font-size: 1.1rem;
      padding: 0.75rem;
    }
  }

  .phrases{
    background-color: #051765;
    color: white;
    height: 100vh;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .grammar {
    background-color: #131313;
    color: white;
    height: 100vh;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }