html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Futura', 'Futura-Medium', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #81c5c9 0%, #36797d 100%);
  display: flex;
  flex-direction: column;
  position: relative;
}


body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(69, 157, 161, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(54, 121, 125, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(129, 197, 201, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: calc(100vh - 100px);
  position: relative;
  z-index: 1;
}

.model-container {
  width: 100%;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  box-shadow: 
    0 25px 50px rgba(54, 121, 125, 0.15),
    0 15px 35px rgba(69, 157, 161, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
}

.model-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #81c5c9 0%, #459da1 50%, #36797d 100%);
  z-index: 1;
}

/* Model Viewer Styles */
model-viewer {
  width: 100%;
  height: 500px;
  background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
  --poster-color: #f8f9fa;
  --progress-bar-color: #459da1;
  --progress-mask: rgba(69, 157, 161, 0.2);
  position: relative;
}

/* AR Button Styles */
.ar-button {
  background: linear-gradient(135deg, #459da1 0%, #36797d 100%);
  border: none;
  border-radius: 50px;
  color: white;
  font-family: 'Futura', 'Futura-Medium', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    0 8px 25px rgba(69, 157, 161, 0.3),
    0 3px 10px rgba(54, 121, 125, 0.2);
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ar-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 12px 35px rgba(69, 157, 161, 0.4),
    0 5px 15px rgba(54, 121, 125, 0.3);
  background: linear-gradient(135deg, #5bb1b5 0%, #459da1 100%);
}

.ar-button:active {
  transform: translateY(-1px) scale(0.98);
}

.ar-button img {
  width: 22px;
  height: 22px;
  filter: brightness(1.1);
}

.ar-button.disabled,
.ar-button:disabled {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
  box-shadow: 
    0 4px 15px rgba(156, 163, 175, 0.2),
    0 2px 8px rgba(107, 114, 128, 0.1);
}

.ar-button.disabled:hover,
.ar-button:disabled:hover {
  transform: none;
  box-shadow: 
    0 4px 15px rgba(156, 163, 175, 0.2),
    0 2px 8px rgba(107, 114, 128, 0.1);
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.ar-button.disabled img,
.ar-button:disabled img {
  filter: brightness(0.8) grayscale(1);
}

/* AR Prompt Styles */
#ar-prompt {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(54, 121, 125, 0.95) 0%, rgba(69, 157, 161, 0.95) 100%);
  color: white;
  padding: 25px;
  border-radius: 16px;
  text-align: center;
  z-index: 20;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

#ar-prompt img {
  width: 120px;
  height: auto;
  opacity: 0.9;
  filter: brightness(1.1);
}

/* Speech Bubble Styles */
.speech-bubble {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 250px;
  min-width: 160px;
  z-index: 15;
  animation: bubbleFloat 3s ease-in-out infinite alternate;
}

@keyframes bubbleFloat {
  0% { transform: translateX(-50%) translateY(0px); }
  100% { transform: translateX(-50%) translateY(-8px); }
}

.bubble-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
  border: 2px solid rgba(69, 157, 161, 0.2);
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 
    0 10px 30px rgba(69, 157, 161, 0.15),
    0 5px 15px rgba(54, 121, 125, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
}

.bubble-content::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #81c5c9 0%, #459da1 50%, #36797d 100%);
  border-radius: 22px;
  z-index: -1;
  opacity: 0.3;
}

.bubble-content p {
  margin: 0;
  font-family: 'Futura', 'Futura-Medium', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  line-height: 1.4;
  text-align: center;
  animation: textFadeIn 0.5s ease-in;
}

@keyframes textFadeIn {
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.bubble-tail {
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 15px solid rgba(255, 255, 255, 0.95);
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(69, 157, 161, 0.1));
}

.bubble-tail::before {
  content: '';
  position: absolute;
  top: -17px;
  left: -17px;
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 17px solid rgba(69, 157, 161, 0.2);
}

/* Instructions Styles */
.instructions {
  padding: 25px;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid rgba(69, 157, 161, 0.1);
  font-family: 'Futura', 'Futura-Medium', 'Helvetica Neue', Arial, sans-serif;
}

.instructions p {
  margin: 10px 0;
  color: #666;
  font-size: 15px;
  font-weight: 500;
}

.instructions p:first-child {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.ar-instruction {
  color: #459da1 !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #459da1, #36797d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Progress Bar Styles */
.progress-bar {
  display: block;
  width: 33%;
  height: 10%;
  max-height: 2%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  border-radius: 25px;
  box-shadow: 0px 5px 15px rgba(69, 157, 161, 0.3), 0px 0px 10px rgba(54, 121, 125, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, rgba(54, 121, 125, 0.8) 0%, rgba(69, 157, 161, 0.8) 100%);
  backdrop-filter: blur(5px);
}

.progress-bar.hide {
  visibility: hidden;
  transition: visibility 0.3s;
}

.update-bar {
  background: linear-gradient(90deg, #81c5c9 0%, #459da1 100%);
  width: 0%;
  height: 100%;
  border-radius: inherit;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(69, 157, 161, 0.5);
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%);
  text-align: center;
  padding: 25px;
  color: #333;
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(69, 157, 161, 0.1);
  font-family: 'Futura', 'Futura-Medium', 'Helvetica Neue', Arial, sans-serif;
  position: relative;
  z-index: 1;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #81c5c9 0%, #459da1 50%, #36797d 100%);
}

.footer h2 {
  margin: 0 0 12px 0;
  background: linear-gradient(135deg, #459da1 0%, #36797d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
}

.footer a {
  color: #459da1;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #459da1, #36797d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer a:hover {
  text-decoration: underline;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
    min-height: calc(100vh - 80px);
  }
  
  model-viewer {
    height: 400px;
  }
  
  .model-container {
    border-radius: 20px;
  }
  
  .ar-button {
    bottom: 15px;
    right: 15px;
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .ar-button img {
    width: 20px;
    height: 20px;
  }
  
  .footer {
    padding: 20px;
  }
  
  .footer h2 {
    font-size: 24px;
  }
  
  .instructions {
    padding: 20px;
  }
  
  .speech-bubble {
    top: 15px;
    width: 60%;
    max-width: 280px;
    min-width: 180px;
  }
  
  .bubble-content {
    padding: 14px 18px;
  }
  
  .bubble-content p {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  model-viewer {
    height: 350px;
  }
  
  .instructions {
    padding: 18px;
  }
  
  .instructions p {
    font-size: 13px;
  }
  
  .ar-button {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .ar-button img {
    width: 18px;
    height: 18px;
  }
  
  .footer h2 {
    font-size: 22px;
  }
  
  .speech-bubble {
    top: 12px;
    width: 80%;
    max-width: 250px;
    min-width: 160px;
  }
  
  .bubble-content {
    padding: 12px 16px;
    border-radius: 16px;
  }
  
  .bubble-content p {
    font-size: 13px;
    line-height: 1.3;
  }
  
  .bubble-tail {
    border-left-width: 12px;
    border-right-width: 12px;
    border-top-width: 12px;
    bottom: -10px;
  }
}
