/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Vazirmatn", sans-serif;
}

/* BODY */
body {
    padding-top: 15px;
    padding-bottom: 75px;
  min-height: 100dvh;
  background: linear-gradient(135deg, #0f2027, #203a43);
  color: white;

  box-sizing: border-box;

  overflow-x: hidden;   
  overflow-y: auto;    
}

html {
  background: #0f2027;
}

/* HEADER */
.lesson-header {
  text-align: center;
  margin-bottom: 15px;
}

.lesson-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;

  background: linear-gradient(
    to bottom,
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,0.85) 60%,
    rgba(255,255,255,0.4) 100%
  );

  background-clip: text;           
  -webkit-background-clip: text;    

  -webkit-text-fill-color: transparent;
}

.lesson-info {
  text-align: center;
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.75;
}


/* 🔥 BOOK */
.book {
  width: 100%;
  max-width: 560px;
  height: 500px;
  transform: translateX(-1px);
  margin: 20px auto;
  display: flex;
  border-radius: 18px;
  overflow: hidden;         
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  transition: transform 0.25s ease;
}
.book:hover {
  transform: translateX(-1px) scale(1.02);   
}


/* 🔥 PAGE */
.page {
  width: 100%;
  max-width: 100%;
  margin: 0;              
  display: none;
  background: #f1e6e6;
  border-radius: 16px;
  transition: all 0.4s ease;
}

.page.active {
  display: flex;
  width: 100%;
  height: 500px;        
  background: #f5f5f5;
  flex-direction: row;
  align-items: stretch;
  opacity: 1;
}
/* 🔥 LAYOUT */
.layout {
  width: 100%;
  padding: 0;             
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* 🔥 CONTAINER */
.book-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* 🔥 COLUMNS */
.left, .right {
  width: 50%;
  padding: 16px;

  overflow-y: auto;   
  min-width: 0; 
}

/* LEFT */
.left {
  border-right: 1px solid #ddd;
  color: #222;
  direction: ltr;
}

/* RIGHT */
.right {
  direction: rtl;
  text-align: right;
  color: #2e7d32;
}
/* TEXT */
.page p {
  margin-bottom: 10px;
  font-size: 14px;  
  line-height: 1.9;
}

/* SIDE PANEL */
.side-panel {
  margin-top: 5px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* CARD */
.side-box {
  width: 260px;
  padding: 20px;
  border-radius: 20px;

  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);

  border: 1px solid rgba(255,255,255,0.15);

  box-shadow: 
    0 10px 30px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.1);

  transition: 0.3s;
}

.side-box:hover {
  transform: translateY(-6px) scale(1.03);
}

.side-box h3 {
  font-size: 18px;
  margin-bottom: 15px;
}

.side-box ul {
  list-style: none;
}

.side-box li {
  margin-bottom: 10px;
  font-size: 14px;

  padding: 10px 14px;
  border-radius: 12px;

  background: rgba(255,255,255,0.08);
}

/* COLORS */
.fragen {
  border: 1px solid rgba(255, 80, 80, 0.5);
}

.fragen h3 {
  color: #ff4d4d;
}

.wort {
  border: 1px solid rgba(0,255,135,0.5);
}

.wort h3 {
  color: #00ff87;
}

/* NAV */
.nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  gap: 12px;

  z-index: 999;
}

.nav button {
  width: 48px;
  height: 48px;
  margin: 0 8px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.2);

  background: rgba(255,255,255,0.08);

  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: 0.25s;
}

.nav button:hover {
  transform: translateY(-3px) scale(1.05);
}

/* MOBILE */

@media (max-width: 700px) {

.lesson-title {
  font-size: 20px;  
  }
  html, body {
    height: auto;
    overflow-y: auto;
  }

  body {
    overflow-y: auto;
    padding-bottom: 80px;
  }


 .layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;   
}

  /* 🔥 کتاب */
  .book {
    margin: 10px auto 0 auto;
    height: 420px;
    transform: scale(0.85);
    transform-origin: top center;
    margin-bottom: -30px;
    transition: transform 0.1s ease;
    position: relative;
  }
  .page.active {
  display: flex;
  width: 100%;
  height: 500px;       
  background: #f5f5f5;
  flex-direction: row;
  align-items: stretch;
  opacity: 1;
}
  .book:hover {
  transform: scale(0.90);   
}

  /* متن داخل کتاب */
  .page p {
    font-size: 10px;
    line-height: 1.5;
    margin-bottom: 6px;
  }

  .page h2 {
    font-size: 14px;
    margin-bottom: 6px;
  }

  /* دو ستون کتاب */
  .page.active {
    display: flex;
    flex-direction: row;
  }

  .left, .right {
    width: 50%;
    padding: 8px;
  }

  /* کارت‌ها (خیلی مهم) */
  .side-panel {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 6px;             
    flex-wrap: nowrap;
    margin-top: 0px;    
  }

  .side-box {
    width: 48%;           
    padding: 10px;       
  }

  .side-box h3 {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .side-box li {
    font-size: 11px;
    padding: 6px 8px;
    margin-bottom: 6px;
  }

  /* دکمه‌ها */
  .nav {
    margin-top: 10px;      
    margin-bottom: 10px;
  }

  .nav button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
/* جعبه پرش */
.jump-box {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    gap: 6px;
    margin: 6px 0 !important;
  }

  .jump-box input {
    width: 60px !important;
    padding: 6px !important;
    font-size: 12px !important;
    border-radius: 10px;
  }

  .jump-box input::placeholder {
    font-size: 10px;
  }

  .jump-box button {
    padding: 6px 10px !important;
    font-size: 12px !important;
    border-radius: 10px;
  }
}
/* INFO */
.lesson-info {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 5px;
}
.progress-container {
  width: 100%;
  max-width: 270px;
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  margin: 10px auto;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ff87, #60efff);
  transition: 0.4s;
}

.progress-text {
  text-align: center;
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.8;
}
/* PREMIUM MODAL */
.premium-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.premium-box {
  width: 90%;
  max-width: 400px;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  color: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  animation: popUp 0.3s ease;
}

@keyframes popUp {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.premium-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.lock {
  font-size: 28px;
}

.premium-desc {
  margin: 15px 0;
  color: #ddd;
  font-size: 14px;
}

.premium-list {
  text-align: right;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.premium-list li {
  margin: 8px 0;
  color: #cfcfcf;
}

.premium-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.buy-btn {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  color: #000;
  transition: 0.3s;
}

.buy-btn:hover {
  transform: scale(1.05);
}

.later-btn {
  background: #ccc;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-size: 15px;
  cursor: pointer;
}
/* JUMP BOX */
.jump-box {
  display: flex;
  justify-content: center;  
  align-items: center;
  gap: 10px;
  margin: 12px 0;       
}

/* حذف فلش */
.jump-box input::-webkit-inner-spin-button,
.jump-box input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.jump-box input {
  width: 90px;
  padding: 10px;
  border-radius: 12px;
  border: none;
  text-align: center;
  font-size: 14px;
  background: #e6e6e6;
  color: #333;
  outline: none;

  appearance: textfield;
}

.jump-box input::placeholder {
  font-size: 12px; 
  color: #777;
}

.jump-box button {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, #00ff87, #60efff);
  font-weight: bold;
  cursor: pointer;
}