81% of storage used … If you run out of storage, you can't create, edit or upload files. Get 30 GB for ₱49 ₱10/mo for 3 months.
/********** Template CSS **********/
:root {
    --primary: #06BBCC;
    --light: #F0FBFC;
    --dark: #181d38;
}

.fw-medium {
    font-weight: 600 !important;
}

.fw-semi-bold {
    font-weight: 700 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 0px;
}


/********** Navbar Styles **********/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
  }
  
  .navbar-light .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-size: 15px;
    text-transform: uppercase;
    outline: none;
  }
  
  .navbar-light .navbar-nav .nav-link:hover,
  .navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
  }
  
  .navbar-light .navbar-brand,
  .navbar-light a.btn {
    height: 75px;
  }
  
  .navbar-light .navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
  }
  
  .navbar-light.sticky-top {
    top: -100px;
    transition: .5s;
  }
  
  /* Navbar Dropdown Animation */
  @media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
      display: block;
      margin-top: 0;
      opacity: 0;
      visibility: hidden;
      transition: .5s;
    }
  
    .navbar .dropdown-menu.fade-down {
      top: 100%;
      transform: rotateX(-75deg);
      transform-origin: 0% 0%;
    }
  
    .navbar .nav-item:hover .dropdown-menu {
      top: 100%;
      transform: rotateX(0deg);
      visibility: visible;
      transition: .5s;
      opacity: 1;
    }
  }
  
  @media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link {
      margin-right: 0;
      padding: 10px 0;
    }
  
    .navbar-light .navbar-nav {
      border-top: 1px solid #EEEEEE;
    }
  }
  
  /*** Progress Button ***/
  .progress-btn {
    background: var(--primary);
    color: #FFFFFF !important;
    border-radius: 5px;
    padding: 8px 20px !important;
    margin: 5px 0;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .progress-btn:hover {
    background: #05a3b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  .progress-btn i {
    font-size: 1.1rem;
    margin-right: 8px;
  }
  
  .progress-text {
    font-weight: 600;
    letter-spacing: 0.5px;
  }
  
  @media (max-width: 991.98px) {
    .progress-btn {
        margin: 10px 0;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .progress-btn i {
        font-size: 1rem;
    }
    
    .progress-text {
        font-size: 0.95rem;
    }
  }
  

/* 
  Custom styles for Sign to Text section
  - Scanner camera box
  - Buttons
  - Responsive adjustments
*/

/* Scanner-like capture box */
.scanner-box {
    width: 100%;
    max-width: 800px;
    height: 400px;
    background-color: #fdfaf7;
    border: 2px dashed #17c0d1;
    border-radius: 10px;
  }
  
  /* Output text box */
  .output-area {
    max-width: 800px;
    margin: 0 auto;
  }
  
  /* Circle button design */
  .circle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: all 0.3s ease;
  }
  
  .circle-btn:hover {
    transform: scale(1.1);
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .scanner-box {
      height: 300px;
    }
  
    .circle-btn {
      width: 50px;
      height: 50px;
    }
  
    #translateBtn {
      width: 100%;
    }
  }
  
  @media (max-width: 576px) {
    .scanner-box {
      height: 250px;
    }
  }

  video#webcam {
    object-fit: cover;
  }
  

/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-weight: normal;
    border: 1px solid #FFFFFF;
    border-radius: 35px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

/* Terms and Privacy Policy Modal Styles */
.modal-content {
  border-radius: 1rem;
  border: none;
}

.modal-header {
  background-color: var(--primary);
  color: white;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.modal-header .btn-close {
  color: white;
  filter: brightness(0) invert(1);
}

.modal-body {
  padding: 2rem;
}

.modal-body h4 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.modal-body ul {
  padding-left: 1.5rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
  color: #666;
}

.modal-footer {
  border-top: 1px solid #eee;
  padding: 1rem 2rem;
}

.modal-footer .btn-secondary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.modal-footer .btn-secondary:hover {
  background-color: #05a3b1;
  border-color: #05a3b1;
}



:root {
  --primary-color: #007f8b;
  --secondary-color: #2196f3;
  --error-color: #dc3545;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --background-color: #f8f9fa;
  --text-color: #333;
  --border-radius: 8px;
  --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-container {
  width: min(1100px, 100%);
  margin: clamp(2.75rem, 4vw + 1rem, 4rem) auto clamp(1.5rem, 3vw, 2.5rem);
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 30vw, 360px);
  gap: clamp(1.2rem, 2vw, 2rem);
  align-items: stretch;
  overflow-x: auto;
}

.videoView {
  position: relative;
  width: 100%;
  aspect-ratio: var(--video-aspect, 4 / 5);
  min-height: clamp(320px, 60vh, 640px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  background-color: #f8f9fa;
  border: 3px solid transparent;
  transition: border-color 0.3s ease;
}

.videoView.border-green {
  border-color: #28a745;
}

.videoView.border-yellow {
  border-color: #ffc107;
}

.videoView.border-red {
  border-color: #dc3545;
}

/* Camera Quality Indicator */
.camera-quality-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 100;
  backdrop-filter: blur(10px);
  display: none;
}

.quality-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.quality-icon {
  color: #2196f3;
  font-size: 14px;
}

.quality-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.quality-progress-container {
  width: 100%;
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.quality-progress-bar {
  height: 100%;
  background-color: #000000;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

.quality-percentage {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  text-align: left;
}

.silhouette-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 80%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cccccc'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 1.2em;
  text-align: center;
}

.silhouette-placeholder::after {
  content: "Click 'Start' to begin";
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #666;
}

.silhouette-placeholder.auto-start::after {
  content: "Starting camera...";
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

video, canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  transform: scaleX(-1); /* Mirror visuals only */
}

video.active, canvas.active {
  display: block;
}

.controls-container {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 0.8vw, 0.6rem);
  width: 100%;
  margin: 0;
  padding: clamp(0.6rem, 1.2vw, 0.8rem);
  min-height: clamp(200px, 40vh, 400px);
  height: 100%;
  background: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.result-label-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.15rem;
}

.result-label {
  font-weight: 600;
  font-size: 24px;
  color: var(--dark);
  line-height: 1.2;
  margin: 0;  
}

@media (min-width: 992px) {
  .result-label {
    font-size: 28px;
  }
}

canvas {
  pointer-events: none;
}

/* Back Button Container - Default Styles */
.back-button-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

.back-button-container .btn {
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.camera-feedback {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  padding: 15px 25px;
  border-radius: 25px;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.result-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.65);
  color: #ffffff;
  font-weight: 800;
  font-size: 48px;
  letter-spacing: 0.15em;
  text-shadow: 0 25px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(6, 187, 204, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.result-popup.show {
  animation: resultPop 2.15s ease-out forwards;
}

@keyframes resultPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -55%) scale(0.6);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -48%) scale(1.15);
  }
  55% {
    transform: translate(-50%, -50%) scale(0.98);
  }
  85% {
    opacity: 1;
    transform: translate(-50%, -51%) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -55%) scale(0.88);
  }
}

.feedback-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feedback-icon {
  font-size: 24px;
  animation: bounce 1s ease-in-out infinite;
}

.feedback-text {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.camera-feedback.hold {
  background: rgba(255, 193, 7, 0.4);
  border-color: #ff8c00;
}

.camera-feedback.delay {
  background: rgba(23, 162, 184, 0.4);
  border-color: #138496;
}

.camera-feedback.recording {
  background: rgba(220, 53, 69, 0.4);
  border-color: #c82333;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

#predictionText {
  width: 100%;
  flex: 1 1 auto;
  min-height: clamp(60px, 14vh, 110px);
  max-height: clamp(120px, 20vh, 180px);
  margin: 0;
  padding: clamp(0.6rem, 1.3vw, 0.85rem);
  border: 2px solid #06BBCC;
  border-radius: var(--border-radius);
  background-color: white;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  overflow-y: auto;
  text-align: left;
  box-shadow: var(--box-shadow);
  transition: border-color 0.3s ease;
}

@media (min-width: 992px) {
  #predictionText {
    font-size: 32px;
  }
}

#predictionText:focus {
  border-color: var(--primary-color);
  outline: none;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  width: 50%;
  align-items: stretch;
  text-align: center;
  margin: 0 auto;
}

.mdc-button {
  min-width: 150px;
  height: 38px;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  padding: 0 16px;
  font-size: 13px;
}

.mdc-button .material-icons {
  font-size: 18px;
  margin-right: 5px;
}

.mdc-button--raised {
  background-color: var(--primary-color);
}

.mdc-button--outlined {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

#deleteLastCharButton {
  background-color: var(--error-color);
  color: white;
}

#deleteLastCharButton:hover {
  background-color: #c82333;
}

#clearAllButton {
  background-color: #6c757d;
  color: white;
  border-color: #6c757d;
}

#clearAllButton:hover {
  background-color: #5a6268;
  border-color: #5a6268;
}

#distanceStatus {
  font-size: 18px;
  font-weight: 600;
  padding: clamp(0.5rem, 1vw, 0.65rem);
  border-radius: var(--border-radius);
  background-color: white;
  box-shadow: var(--box-shadow);
  width: 100%;
  text-align: center;
}

#gestureStatus {
  font-size: 18px;
  font-weight: 600;
  padding: clamp(0.5rem, 1vw, 0.65rem);
  border-radius: var(--border-radius);
  background-color: white;
  box-shadow: var(--box-shadow);
  width: 100%;
  text-align: center;
  margin-top: 0.25rem;
  color: #6c757d;
}

@media (min-width: 992px) {
  #distanceStatus,
  #gestureStatus {
    font-size: 24px;
  }
}

#recordingProgress {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 4px;
  background-color: #e0e0e0;
  margin: 0.5em 0;
}

#recordingProgress::-webkit-progress-bar {
  background-color: #e0e0e0;
  border-radius: 4px;
}

#recordingProgress::-webkit-progress-value {
  background-color: var(--primary-color);
  border-radius: 4px;
  transition: width 0.3s ease;
}

#loadingContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-bottom: 1em;
  gap: 1em;
}

#cameraLoadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
  text-align: center;
}

#cameraLoadingBanner {
  background: linear-gradient(135deg, #007f8b, #2196f3);
  padding: 30px 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  animation: slideInDown 0.5s ease-out;
}

#cameraLoadingBanner h3 {
  margin: 0 0 15px 0;
  font-size: 24px;
  font-weight: 600;
}

#cameraLoadingBanner p {
  margin: 0 0 20px 0;
  font-size: 18px;
  opacity: 0.9;
}

.camera-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes slideInDown {
  from {
      opacity: 0;
      transform: translateY(-50px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.mdc-linear-progress {
  width: 90%;
  max-width: 300px;
  margin: auto;
  border-radius: 4px;
}

#loadingText {
  margin-bottom: 0.75em;
  font-size: 16px;
  color: var(--text-color);
}

#orientationMessage {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* 90% opacity */
  color: white;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
  gap: 1em;
}

#orientationMessage img {
  width: 100px;
  height: 100px;
  margin: 20px 0;
  animation: rotate 2s infinite linear;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.status-too-close { color: var(--error-color); }
.status-too-far { color: var(--warning-color); }
.status-perfect { color: var(--success-color); }
.status-default { color: var(--secondary-color); }

#orientationMessage h2 {
  color: #4fc3f7; /* light blue */
}

@media (max-width: 1200px) {
  .main-container {
      width: min(94%, 1000px);
      grid-template-columns: minmax(0, 1fr) clamp(230px, 32vw, 340px);
  }
}

@media (max-width: 992px) {
  .main-container {
      grid-template-columns: minmax(0, 1fr) clamp(220px, 38vw, 320px);
      margin: clamp(2.25rem, 6vw, 3rem) auto clamp(1.25rem, 4vw, 2rem);
  }

  .controls-container {
      max-width: min(420px, 100%);
      margin: 0 auto;
      padding: clamp(0.6rem, 1.5vw, 0.8rem);
      gap: clamp(0.35rem, 0.7vw, 0.5rem);
      min-height: clamp(200px, 40vh, 400px);
      height: 100%;
  }

  .button-group {
      flex-direction: column;
      align-items: stretch;
      justify-content: center;
  }
}

@media (max-width: 768px) {
  .main-container {
      padding: 0 clamp(0.75rem, 5vw, 1.25rem);
      gap: clamp(1rem, 3vw, 1.5rem);
      grid-template-columns: minmax(0, 1fr) clamp(210px, 45vw, 280px);
  }

  .videoView {
      min-height: clamp(280px, 55vh, 540px);
      aspect-ratio: 3 / 4;
  }

  .camera-quality-indicator {
      top: 8px;
      right: 8px;
      padding: 8px 10px;
      min-width: 100px;
  }

  .quality-icon {
      font-size: 12px;
  }

  .quality-label {
      font-size: 12px;
  }

  .quality-percentage {
      font-size: 12px;
  }

  .controls-container {
      padding: clamp(0.5rem, 1.5vw, 0.7rem);
      gap: clamp(0.3rem, 0.6vw, 0.5rem);
      min-height: clamp(180px, 35vh, 360px);
      height: 100%;
  }

  .button-group {
      flex-direction: column;
      align-items: stretch;
      gap: 0.5rem;
  }

  .mdc-button {
      min-width: unset;
      width: 100%;
      height: 36px;
      padding: 0 10px;
      font-size: 14px;
  }

  .mdc-button .material-icons {
      font-size: 16px;
  }

  #predictionText {
      flex: 1 1 auto;
      min-height: clamp(90px, 22vh, 160px);
      padding: clamp(0.8rem, 1.6vw, 1.1rem);
  }

  #distanceStatus {
      font-size: 18px;
      padding: clamp(0.4rem, 0.9vw, 0.55rem);
  }

  .back-button-container {
      position: fixed;
      top: 12px;
      left: 12px;
      z-index: 1000;
  }

  .back-button-container .btn {
      padding: 6px 14px;
      font-size: 15px;
  }

  #cameraLoadingBanner {
      padding: 20px 24px;
      max-width: 320px;
  }

  #cameraLoadingBanner h3 {
      font-size: 20px;
  }

  #cameraLoadingBanner p {
      font-size: 16px;
  }

  .camera-loading-spinner {
      width: 32px;
      height: 32px;
  }
}

@media (max-width: 576px) {
  .main-container {
      margin: clamp(2rem, 8vw, 2.5rem) auto clamp(1rem, 6vw, 1.5rem);
      grid-template-columns: minmax(0, 1fr) clamp(200px, 52vw, 260px);
  }

  .controls-container {
      padding: clamp(0.5rem, 2.5vw, 0.8rem);
      gap: clamp(0.35rem, 0.7vw, 0.5rem);
      min-height: clamp(320px, 60vh, 640px);
      height: 100%;
  }

  .mdc-button {
      font-size: 0.8rem;
      height: 34px;
  }

  .camera-feedback {
      bottom: 16px;
      padding: 12px 18px;
  }
}

/* Mobile Landscape Mode - Standard (max-height: 600px) */
@media (max-height: 600px) and (orientation: landscape) {
  .main-container {
    width: 100%;
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    margin: 10px auto;
    padding: 0 8px;
    gap: 8px;
    align-items: flex-start;
    padding-top: 50px;
    grid-template-columns: 55% 45%;
  }

  .videoView {
    width: 100%;
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
    min-height: auto;
    aspect-ratio: auto;
    margin-top: 0;
    flex-shrink: 0;
    position: relative;
  }

  /* Adjust video and canvas to minimize white space - back button overlays */
  .videoView video,
  .videoView canvas {
    top: 0;
    height: 100%;
  }

  .controls-container {
    width: 100%;
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
    min-height: auto;
    overflow-y: auto;
    padding: 8px;
    gap: 6px;
  }

  #predictionText {
    flex: 1 1 auto;
    min-height: 90px;
    padding: 18px;
    font-size: 0.95rem;
  }

  .button-group {
    gap: 4px;
    width: min(320px, 100%);
    align-self: center;
  }

  .mdc-button {
    min-width: 0;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    font-size: 0.85rem;
  }

  .mdc-button .material-icons {
    font-size: 16px;
    margin-right: 4px;
  }

  #distanceStatus {
    font-size: 19px;
    padding: 6px;
  }

  #gestureStatus {
    font-size: 19px;
    padding: 6px;
    margin-top: 4px;
  }

  #recordingProgress {
    height: 4px;
    margin: 4px 0;
  }

  .camera-feedback {
    bottom: 12px;
    padding: 8px 16px;
  }

  .feedback-text {
    font-size: 12px;
  }

  .feedback-icon {
    font-size: 18px;
  }

  .back-button-container {
    position: fixed;
    top: 5px;
    left: 10px;
    z-index: 1001;
  }

  .back-button-container .btn {
    padding: 4px 12px;
    font-size: 14px;
    width: auto;
    height: 32px;
  }
}

/* Mobile Landscape Mode - Extra Small (max-height: 400px) */
@media (max-height: 400px) and (orientation: landscape) {
  .main-container {
    width: 100%;
    height: calc(100vh - 10px);
    max-height: calc(100vh - 10px);
    margin: 5px auto;
    padding: 0 6px;
    gap: 6px;
    align-items: flex-start;
    padding-top: 45px;
    grid-template-columns: 52% 48%;
  }

  .videoView {
    width: 100%;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    min-height: auto;
    aspect-ratio: auto;
  }

  /* Adjust video and canvas to minimize white space - back button overlays */
  .videoView video,
  .videoView canvas {
    top: 0;
    height: 100%;
  }

  .controls-container {
    width: 100%;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    min-height: auto;
    overflow-y: auto;
    padding: 6px;
    gap: 4px;
  }

  #predictionText {
    flex: 1 1 auto;
    min-height: 80px;
    padding: 16px;
    font-size: 14px;
  }

  .mdc-button {
    min-width: 0;
    width: 100%;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .button-group {
    width: min(300px, 100%);
    gap: 3px;
    align-self: center;
  }

  .mdc-button .material-icons {
    font-size: 14px;
    margin-right: 3px;
  }

  #distanceStatus {
    font-size: 14px;
    padding: 4px;
  }

  #gestureStatus {
    font-size: 14px;
    padding: 4px;
    margin-top: 3px;
  }

  #recordingProgress {
    height: 3px;
    margin: 3px 0;
  }

  .camera-feedback {
    bottom: 8px;
    padding: 6px 12px;
  }

  .feedback-text {
    font-size: 11px;
  }

  .feedback-icon {
    font-size: 16px;
  }

  .back-button-container {
    position: fixed;
    top: 5px;
    left: 8px;
    z-index: 1001;
  }

  .back-button-container .btn {
    padding: 3px 10px;
    font-size: 12px;
    width: auto;
    height: 28px;
  }
}

/* Network wait overlay */
#networkWaitOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
}
#networkWaitOverlay .network-wifi {
  color: #ffffff;
  font-size: 180px;
  animation: wifiPulse 1.1s ease-in-out infinite;
}
@keyframes wifiPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* Help Description - Hidden (using popup instead) */
.help-description {
  display: none;
}

/* Help Icon Container - Always Visible */
.help-icon-container {
  display: flex;
  position: relative;
  margin-left: auto;
}

.help-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  padding: 0;
}

.help-icon-btn:hover {
  background-color: #05a3b1;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.help-icon-btn:active {
  transform: scale(0.95);
}

/* Help Description Mobile - Popup */
.help-description-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(5px);
}

.help-description-mobile.show {
  display: flex;
}

.help-description-content {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.help-description-content h4 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 600;
  padding-right: 2rem;
}

.help-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.help-title-row h4 {
  flex: 1;
  margin: 0;
}

.help-gif-btn {
  border: none;
  background: linear-gradient(135deg, var(--primary-color), #05a3b1);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(6, 187, 204, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-left: auto;
}

.help-gif-btn:hover,
.help-gif-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(6, 187, 204, 0.35);
  outline: none;
}

.help-description-content p {
  margin: 0 0 1rem 0;
  font-size: 15px;
  line-height: 1.6;
}

.help-description-content ul {
  margin: 0;
  padding-left: 1.25rem;
}

.help-description-content li {
  margin-bottom: 0.5rem;
  font-size: 15px;
  line-height: 1.6;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments for help icon */
@media (max-height: 600px) and (orientation: landscape) {
  .help-icon-btn {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
}

@media (max-height: 400px) and (orientation: landscape) {
  .help-icon-btn {
    width: 26px;
    height: 26px;
    font-size: 16px;
  }
}

/* Thumb Popup Overlay */
.thumb-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.thumb-popup-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.thumb-popup-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 2rem clamp(1.5rem, 5vw, 2.75rem);
  max-width: 420px;
  width: calc(100% - 2.5rem);
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
  text-align: center;
  position: relative;
  border: 2px solid rgba(6, 187, 204, 0.25);
  animation: popupScale 0.35s ease;
}

.thumb-popup-image {
  width: 160px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 1.25rem;
  display: block;
}

.thumb-popup-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.thumb-popup-card p {
  font-size: 16px;
  color: #475569;
  margin: 0;
}

.thumb-popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: rgba(99, 102, 241, 0.1);
  color: #0f172a;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.thumb-popup-close:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: rotate(90deg);
}

@keyframes popupScale {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .thumb-popup-card {
    padding: 1.5rem;
  }

  .thumb-popup-card h3 {
    font-size: 19px;
  }

  .thumb-popup-card p {
    font-size: 15px;
  }
}