/* GLOBAL STYLING ------- ------- ------- ------- ------- ------- ------- */

body, html {
  min-height: 100%;
  height: auto; /* allow body to expand with content */
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: url('/images/English_Tree_App_Background.png') no-repeat center center fixed;
  background-size: cover;
  padding-bottom: 20px; /* ensures a gap at the bottom */
}

/* INSTALL APP iOS/Android ------- ------- ------- */

#install-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  color: black;
  font-family: sans-serif;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 9999;
}
#install-overlay.visible {
  display: flex;
}
#install-button {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #1976d2;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  color: white;
}

/* MOBILE-FIRST MEDIA QUERIES ------- ------- ------- ------- ------- ------- ------- */

/* Extra-Small Screens <= 280px */
@media (max-width: 280px) {

  #loginSection h2 {
    font-size: 1.4rem;
  }

  #loginSection p,
  #loginForm label {
    font-size: 0.95rem;
  }

  #enterButton {
    font-size: 1.1rem;
    padding: 12px 0;
  }

  .homepage-button {
    font-size: 1rem;
    padding: 12px 16px;
  }

  #learningArea {
    padding: 8px;
  }

  #exitLearningBtn {
    font-size: 12px;
    padding: 6px 10px;
  }

}

/* Small Screens <= 320px */
@media (max-width: 320px) {

  /* Apparently not used: .container
    .container {
      padding: 0 12px;
      margin-top: 20px;
    }
  */

  #mainLandingPageLogo img {
    height: 90px;
  }

  .modal-image-button,
  .modal-change-image-button {
    font-size: 0.9rem;
    padding: 12px 0;
    border-radius: 14px;
  }

  #homepageButtonsContainer {
    grid-template-columns: 1fr;
  }

  #learningArea {
    padding: 10px;
  }

  #exitLearningBtn {
    font-size: 13px;
    padding: 7px 12px;
  }

}

/* Medium Screens / Landscape Phones >= 480px */
@media (min-width: 480px) {

  #homepageButtonsContainer {
    display: grid; /* only here */
    grid-template-columns: 1fr 1fr; /* 2 columns */
    gap: 16px;
    width: 100%;
    align-items: stretch; /* ensures buttons fill their cells */
  }

  .modal-content {
    max-width: 400px;
    padding: 24px;
  }

  #exitLearningBtn {
    font-size: 14px;
    padding: 8px 12px;
  }

}

/* Larger Tablets >= 600px */
@media (min-width: 600px) {

  #homepageButtonsContainer {
    grid-template-columns: 1fr 1fr 1fr; /* 3 columns */
    gap: 18px;
  }

  .modal-content {
    max-width: 450px;
    padding: 28px;
  }

}



/* GLOBAL STYLING ------- ------- ------- ------- ------- ------- ------- */

/* GENERAL MODAL */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /* semi-transparent */
  display: none;
  /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;
  /* small padding for mobile */
  box-sizing: border-box;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  border-radius: 20px;
  max-width: 360px;
  width: 100%;
  padding: 24px 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  max-height: 90vh;
}

#modalCloseBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#modalBody {
  margin-top: 50px;
  margin-bottom: 50px;
}

/* GENERAL MODAL BUTTONS */

.general-modal-button {
  width: 100%;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #0a84ff, #5ac8fa);
  color: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  margin-top: 15px;
  margin-bottom: 15px;
}

.general-modal-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  filter: brightness(1.05);
}

.general-modal-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* SECTION WRAPPER */

.sectionBox {
  font-size: calc(1rem * 0.90);
  border: 2px solid #000;
  border-radius: 12px;
  padding: 7px; 
  margin: 10px auto; 
  background-color: rgba(255, 255, 255, 0.6); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 600px;
  width: 90%;
}

/* ALERT MESSAGES */

.redAlertMessages {
  margin-top: 10px;
  margin-bottom: 25px;
  color: #cc0000;
  font-weight: bold;
  text-shadow: 1px 1px 2px #ffcccc;
}

.yellowAlertMessages {
  margin-top: 10px;
  margin-bottom: 25px;
  color: #b58900; /* golden/yellow color for alert */
  font-weight: bold;
  text-shadow: 1px 1px 2px #fff2cc; /* soft yellow shadow */
}

.greenSuccessMessages {
  margin-top: 10px;
  margin-bottom: 25px;
  color: #008000;
  font-weight: bold;
  text-shadow: 1px 1px 2px #ccffcc;
}



/* LOGIN STYLING ------- ------- ------- ------- ------- ------- ------- */

#loginSection {
  display: flex;
  flex-direction: column;
  justify-content: center;
  left: 16px;
  right: 16px;
  max-width: 400px;
  margin: 0 auto;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 24px;
  box-sizing: border-box;
}

#loginSection h2 {
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 0;
}

#loginSection p {
  font-size: 1.1rem;
  margin-top: 4px;
  margin-bottom: 20px;
  color: #555;
}

#loginForm label {
  display: block;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 6px;
}

#loginForm input[type="text"],
#loginForm input[type="password"] {
  width: 100%;
  padding: 12px 10px;
  font-size: 1rem;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

.password-wrapper {
  position: relative;
}

.password-label-row {
  display: flex;
  align-items: center;
  
  
}

#togglePassword {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
    margin-top: 16px;
  margin-bottom: 6px;
  
}

#enterButton {
  margin-top: 25px;
  margin-bottom: 25px;
  width: 100%;
  padding: 14px 0;
  font-size: 1.25rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background-color: #0a84ff;
  /* Apple system blue */
  color: white;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

#enterButton:hover {
  background-color: #0066d6;
}

#noAccountPrompt {
  font-size: 0.9rem !important;
  color: #000;
  text-align: center;
}

#companyLoginFooter {
  font-size: 0.7rem !important;
  color: black !important;
  text-align: center;
}



/* LOGIN PROGRESS BAR ------- ------- ------- ------- ------- ------- ------- */

/* 💫 Progress Bar Container */
.loginProgressBarContainer {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
  position: relative;
}

/* 🌈 Animated Bar */
.loginProgressBar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  border-radius: 4px;
  animation: loginBarAnim 1.8s ease-in-out infinite;
}

/* 🔄 Keyframes for movement */
@keyframes loginBarAnim {
  0% { width: 0%; transform: translateX(0); }
  50% { width: 70%; transform: translateX(30%); }
  100% { width: 100%; transform: translateX(100%); }
}

/* 📱 Message Text */
.loginProgressText {
  text-align: center;
  font-size: 0.9rem;
  color: #000000;
  margin-top: 6px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* ✨ Transition In */
.loadingMessage {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}



/* CENTER TOP PHOTO ------- ------- ------- ------- ------- ------- ------- */

#mainLandingPageLogo {
  position: relative;       
  text-align: center;
  margin-top: 25px;
  margin-bottom: 25px;
  z-index: 2;   
}

#mainLandingPageLogo img {
  width: 50vw;           /* responsive width */
  max-width: 125px;      /* prevent oversized image */
  aspect-ratio: 1 / 1;   /* ensure square shape */
  border-radius: 50%;    /* make circular */
  object-fit: cover;     /* crop to fill circle */
  border: 2px solid #fff; /* thin white border */
  box-sizing: border-box; /* include border in size */
  user-select: none;
  -webkit-user-drag: none;
}



/* STUDENT NAME ------- ------- ------- ------- ------- ------- ------- */

#nameHolder {
  display: flex;
  justify-content: center;
}

.studentFirstName {
  position: relative;             
  font-family: 'Arial';
  font-weight: 700;               
  font-size: 1.5rem;  
  letter-spacing: 1.5px;    
  background: rgba(255, 255, 255, 0.5);      
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);        /* Safari support */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 1.10);
  color: #000;                    
  padding: 8px 16px;              
  border-radius: 5px;     
  border: 2px solid #fff;        /* thin white border */
  box-sizing: border-box;        /* include border in size */           
  z-index: 2;      
}

.studentFirstName::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200%;                     
  height: 100%;
  background: radial-gradient(circle, 
    rgba(255, 255, 255, 0.7) 50%,     
    rgba(255, 255, 255, 0.8) 25%,  
    rgba(255, 255, 255, 0.4) 50%,  
    rgba(255, 255, 255, 0) 100%    
  );
  filter: blur(20px);             
  z-index: -1;                       
}



/* CONFETTI STYLING ------- ------- ------- ------- ------- ------- ------- */

#homepageConfetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; 
  z-index: 1;           
}



/* HOMEPAGE STYLING ------- ------- ------- ------- ------- ------- ------- */

#homepage {
  position: relative;   
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;      
  margin: 40px auto 0 auto;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7e6 0%, #ffbb66 100%);
  box-shadow: 0 8px 24px rgba(255, 153, 51, 0.25);
  color: #663300;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  text-align: center;
  font-size: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;      
}

#homepageButtonsContainer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.homepage-button {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(192, 192, 192, 0.6);
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, filter 0.25s ease;
  background: linear-gradient(135deg, #fff, #ccc, #999, #fff);
  color: #000;
}

.homepage-button:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.homepage-button.shimmer-active::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.4) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(25deg);
  pointer-events: none;
  animation: shimmer 1.5s forwards;
}

@keyframes shimmer {
  0% {
    transform: rotate(25deg) translateX(-100%);
  }

  100% {
    transform: rotate(25deg) translateX(100%);
  }
}

.homepage-button:nth-child(1).shimmer-active::before {
  animation-delay: 0s;
}

.homepage-button:nth-child(2).shimmer-active::before {
  animation-delay: 0.2s;
}

.homepage-button:nth-child(3).shimmer-active::before {
  animation-delay: 0.4s;
}

.homepage-button:nth-child(4).shimmer-active::before {
  animation-delay: 0.6s;
}

.homepage-button:nth-child(5).shimmer-active::before {
  animation-delay: 0.8s;
}

.homepage-button:nth-child(6).shimmer-active::before {
  animation-delay: 1s;
}

.homepage-button:nth-child(7).shimmer-active::before {
  animation-delay: 1.2s;
}

.homepage-button:nth-child(8).shimmer-active::before {
  animation-delay: 1.4s;
}

.homepage-button:nth-child(9).shimmer-active::before {
  animation-delay: 1.6s;
}



/* OTHER PAGES ------- ------- ------- ------- ------- ------- ------- */

.button-page {
  max-width: 400px;
  margin: 40px auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #000;
  text-align: center;
  font-size: 1.3rem;
  padding: 20px;
  min-height: 500px;
}

.button-page button {
  margin-top: 30px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: #333;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.button-page button:hover {
  background: #555;
}



/* 1. START LESSONS ------- ------- ------- ------- ------- ------- ------- */

.studentProgressBarContainer {
  width: 100%;
  height: 18px;
  background-color: #f87171;
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0;
    border: 1px solid black;
}

.studentProgressBarFill {
  height: 100%;
  background-color: #22c55e; /* green */
  border-radius: 12px 0 0 12px;
  transition: width 0.6s ease;
}

.studentProgressText {
  font-size: 0.9rem;
  text-align: center;
  color: #333;
  margin-top: 4px;
}



/* 2. REVIEW LESSONS ------- ------- ------- ------- ------- ------- ------- */

/* COVER FLOW */
.coverFlowWrapper {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  position: relative;
  user-select: none;
}

.coverFlowTrack {
  display: flex;
  gap: 20px;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.coverFlowSlide {
  flex: 0 0 auto;
  width: 250px;
  height: 650px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  border-radius: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.slideContent h3 {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
}

.fanSectionBox {
  font-size: 0.75rem;
  border: 1px solid #000;
  border-radius: 10px;
  padding: 8px; 
  margin: 5px auto;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 90%;
  max-width: 600px;
  color: #000;
  text-align: left;
  overflow-wrap: break-word;
}

.slideTitle h3 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.slideBody p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.2;
}



/* 3. MY CALENDAR ------- ------- ------- ------- ------- ------- ------- */

.actionBtn {
  background-color: #007bff;   /* primary color */
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;

  min-width: 300px;   /* adjust as needed */
  max-width: 300px;   /* adjust as needed */

  display: block;
  margin: 0 auto;     /* centers horizontally */
}

.actionBtn:hover {
  background-color: #0056b3;  /* slightly darker on hover */
}

.actionBtn:active {
  background-color: #004080;  /* active press state */
}

.time-slot {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  margin: 8px 0;
  text-align: center;
  font-size: 18px;
  background-color: #f9f9f9;
  transition: background-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.time-slot:active {
  background-color: #e0f0ff;
}



/* 4. AI ANALYSIS ------- ------- ------- ------- ------- ------- ------- */



/* 5. MY BALANCE ------- ------- ------- ------- ------- ------- ------- */

.monthData {
  text-align: left; 
}

.monthSelectorWrapper {
  margin-top: 20px;           
  display: flex;
  flex-direction: column;
  gap: 8px;                   
}

.monthSelectLabel {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}

.monthSelect {
  display: block;              /* make it behave like a block element */
  margin: 0 auto;              /* center horizontally */
  text-align: center;   /* ✅ center the text */
  width: 50%;                
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  appearance: none;           
  transition: border 0.2s, box-shadow 0.2s;
}

.monthSelect:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}



/* 6. MY INVOICES ------- ------- ------- ------- ------- ------- ------- */



/* 7. BUY CLASS CREDITS ------- ------- ------- ------- ------- ------- ------- */



/* 8. REPORT BUGS ------- ------- ------- ------- ------- ------- ------- */

.bug-textarea {
  width: 90%;          /* takes full width of the container */
  min-height: 250px;    /* controls vertical size (default you had) */
  font-size: 0.8rem;       /* adjust text size */
  padding: 14px;        /* inside spacing */
  border-radius: 14px;  /* round corners */
  resize: vertical;     /* user can resize only vertically */
  overflow-y: auto;      /* scroll appears when needed */
  
}



/* LEARNING AREA ------- ------- ------- ------- ------- ------- ------- */
/* LEARNING AREA ------- ------- ------- ------- ------- ------- ------- */
/* LEARNING AREA ------- ------- ------- ------- ------- ------- ------- */

#learningArea {
  background-color: white;
  
  width: 100vw;
  min-height: 100vh; /* ensures at least full viewport, grows with content */
  
  overflow-x: hidden; /* extra safeguard */
  overflow-y: auto;  /* allows vertical scrolling */
  
  box-sizing: border-box; /* ensures padding doesn’t break layout */
  
  touch-action: pan-y; /* smoother mobile scroll */

}

#json-viewer {
  display: block;
  padding: 10px 10px 10px 10px; /*padding: top right bottom left; */
  box-sizing: border-box; /* ensures padding doesn’t break layout */

  background-color: white;
  
  width: 100vw;
  min-height: 100vh; /* ensures at least full viewport, grows with content */
  
  overflow-x: hidden; /* extra safeguard */
  overflow-y: auto;  /* allows vertical scrolling */
  
  touch-action: pan-y; /* smoother mobile scroll */

  font-size: 0.9rem; /* 0.9 × root font size (default 16px) = ~14.4px */

}

body.learning-active,
html.learning-active {
  padding-bottom: 0 !important;
}

#exitLearningBtn {
  display: block;

  width: 100vw;
  height: 75px;
  
  background-color: #007bff;
  color: white;
  border: none;
  
  font-size: 16px;
  
  cursor: pointer;
  touch-action: manipulation;
  
  transition: background-color 0.2s ease;
}

#exitLearningBtn:hover,
#exitLearningBtn:active {
  background-color: #0056b3;  /* feedback on touch/click */
}


