* { margin: 0; padding: 0; box-sizing: border-box; }
body, html { height: 100%; overflow: hidden; background: #e8f6ff; font-family: 'Segoe UI', Arial, sans-serif; }

/* --- BACKGROUND & WRAPPER --- */
#model-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('/scooter-3d/model-cresta/assets/bg.jpeg') no-repeat center center;

    background-size: cover;
}

/* --- MODEL VIEWER --- */
model-viewer {
    width: 100%;
    height: 100%;
    background: transparent;
    --poster-color: transparent; 
}

/* --- LOADER --- */
#loader {
    position: absolute; inset: 0; display: flex; justify-content: center; align-items: center;
    background: rgba(255,255,255,0.95); z-index: 100; transition: opacity 0.5s;
}
.strike-loader {
    font-size: 40px; font-weight: 800; letter-spacing: 4px; color: #004d80;
    position: relative; overflow: hidden;
}

/* --- MAIN MENU (BOTTOM BAR) --- */
.feature-bar {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 900px; height: 80px;
    background: linear-gradient(180deg, rgba(46, 102, 133, 0.9), rgba(30, 70, 95, 0.95));
    border-radius: 40px;
    display: flex; justify-content: space-evenly; align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 50; border: 1px solid rgba(255,255,255,0.2);
}

.feature-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #b0c4de; cursor: pointer; transition: 0.3s;
    font-size: 12px; min-width: 60px;
}
.feature-item i { font-size: 20px; margin-bottom: 5px; }
.feature-item:hover, .feature-item.active { color: #fff; transform: translateY(-3px); text-shadow: 0 0 10px rgba(0,255,255,0.5); }

/* --- SUB MENU (THE FLOATING UPPER BAR) --- */
#subMenuBar {
    position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%);
    width: 80%; max-width: 800px; height: 80px;
    background: linear-gradient(180deg, rgba(35, 95, 130, 0.9), rgba(20, 60, 90, 0.95));
    border-radius: 40px;
    display: flex; justify-content: space-evenly; align-items: center; gap: 30px;
    z-index: 40;
    opacity: 0; pointer-events: none; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateX(-50%) translateY(20px); 
    border: 1px solid rgba(255,255,255,0.15);
}

#subMenuBar.visible {
    opacity: 1; pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

/* Items inside Sub Menu */
.sub-item {
    display: flex; flex-direction: column; align-items: center;
    color: #fff; cursor: pointer; font-size: 13px; opacity: 0.7; transition: 0.3s;
}
.sub-item i { font-size: 22px; margin-bottom: 5px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; padding: 8px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; }
.sub-item:hover, .sub-item.active { opacity: 1; }
.sub-item:hover i, .sub-item.active i { background: rgba(255,255,255,0.2); border-color: #fff; }

/* Color Dots */
.color-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.5); margin-bottom: 5px; }

/* --- INFO OVERLAY (THE DETAIL BOX) --- */
#infoOverlay {
    position: absolute; top: 30%; left: 2%;
    width: 320px;
    background: rgba(22, 54, 76, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    border-left: 4px solid #00aaff;
    color: #fff;
    opacity: 0; pointer-events: none; transition: 0.4s;
    transform: translateX(-20px);
    z-index: 60;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#infoOverlay.visible { opacity: 1; pointer-events: all; transform: translateX(0); }

.info-header {
    background: rgba(0,0,0,0.2); padding: 10px 15px;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: bold; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.close-btn { cursor: pointer; opacity: 0.7; transition: 0.2s; }
.close-btn:hover { opacity: 1; color: #ff4444; }

.info-body { padding: 15px; font-size: 14px; line-height: 1.5; color: #e0e0e0; }

.top-bar {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
}

/* Round back button */
.back-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #6fd3f5;
  color: #003b5c;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  padding: 7px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, background 0.2s ease;
}

.back-btn:hover {
  transform: scale(1.1);
  background: #55c4ea;
}

/* Logo */
.brand-logo {
  height: 28px;
  object-fit: contain;
}

/* ===============================
   MOBILE RESPONSIVE ONLY
   =============================== */
@media (max-width: 768px) {

  /* Wrapper */
  #model-wrapper {
    height: 100dvh;
  }

  /* --- TOP BAR --- */
  .top-bar {
    top: 12px;
    left: 12px;
    gap: 8px;
  }

  .back-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
    padding: 6px;
  }

  .brand-logo {
    height: 22px;
  }

  /* --- MAIN FEATURE BAR --- */
  .feature-bar {
    bottom: 10px;
    height: 70px;
    width: 95%;
    padding: 0 10px;
  }

  .feature-item {
    font-size: 10px;
    min-width: 48px;
  }

  .feature-item i {
    font-size: 18px;
    margin-bottom: 4px;
  }

  /* --- SUB MENU BAR --- */
  #subMenuBar {
    bottom: 90px;
    height: 70px;
    width: 92%;
    gap: 18px;
  }

  .sub-item {
    font-size: 11px;
  }

  .sub-item i {
    font-size: 18px;
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .color-dot {
    width: 24px;
    height: 24px;
  }

  /* --- INFO OVERLAY --- */
  #infoOverlay {
    top: auto;
    bottom: 180px;
    left: 50%;
    width: 90%;
    max-width: 360px;
    transform: translateX(-50%) translateY(20px);
  }

  #infoOverlay.visible {
    transform: translateX(-50%) translateY(0);
  }

  .info-header {
    font-size: 14px;
    padding: 8px 12px;
  }

  .info-body {
    font-size: 13px;
    padding: 12px;
  }

  /* --- LOADER --- */
  .strike-loader {
    font-size: 28px;
    letter-spacing: 3px;
  }
}

/* Extra small phones */
@media (max-width: 420px) {

  .feature-bar {
    height: 64px;
  }

  .feature-item i {
    font-size: 16px;
  }

  .feature-item span {
    font-size: 9px;
  }

  #subMenuBar {
    gap: 14px;
  }
}
