/* ===================================
   SHOWCASE PAGE STYLES
   =================================== */

.showcase-page {
  padding: 2rem 0;
}

.showcase-intro {
  margin-bottom: 3rem;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* ===================================
   SHOWCASE CARD STYLES
   =================================== */

.showcase-card {
  background-color: var(--color-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-media {
  position: relative;
  height: 250px;
  background-color: var(--color-gray-light);
  overflow: hidden;
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
}

.card-content p {
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: var(--color-gray-light);
  color: var(--color-gray-dark);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

/* ===================================
   3D MODEL STYLES
   =================================== */

.model-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.model-viewer {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.8);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-gray-light);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.model-viewer canvas {
  max-width: 100%;
  max-height: 100%;
  cursor: grab;
}

.model-viewer canvas:active {
  cursor: grabbing;
}

.model-controls {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* ===================================
   PARALLAX DEMO STYLES
   =================================== */

.parallax-demo {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: move;
}

.parallax-layers {
  position: relative;
  width: 100%;
  height: 100%;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  border-radius: 8px;
  will-change: transform;
}

.parallax-layer:nth-child(1) {
  background: linear-gradient(135deg, rgba(66, 153, 225, 0.3), rgba(49, 130, 206, 0.3));
  z-index: 1;
}

.parallax-layer:nth-child(2) {
  background: linear-gradient(135deg, rgba(72, 187, 120, 0.3), rgba(56, 161, 105, 0.3));
  z-index: 2;
}

.parallax-layer:nth-child(3) {
  background: linear-gradient(135deg, rgba(237, 137, 54, 0.3), rgba(221, 107, 32, 0.3));
  z-index: 3;
}

/* ===================================
   ANIMATION DEMO STYLES
   =================================== */

.animation-demo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.demo-box {
  width: 80px;
  height: 80px;
  background-color: var(--color-primary);
  margin-bottom: 1rem;
}

.demo-box.bounce {
  animation: bounce 1s ease-in-out;
}

.demo-box.pulse {
  animation: pulse 1s ease-in-out infinite;
}

.demo-box.shake {
  animation: shake 0.5s ease-in-out;
}

.demo-box.flip {
  animation: flip 1s ease-in-out;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-10px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(10px);
  }
}

@keyframes flip {
  0% {
    transform: perspective(400px) rotateY(0);
  }
  40% {
    transform: perspective(400px) translateZ(150px) rotateY(170deg);
  }
  50% {
    transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
  }
  80% {
    transform: perspective(400px) rotateY(360deg) scale(0.95);
  }
  100% {
    transform: perspective(400px) scale(1);
  }
}

.demo-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===================================
   PERFORMANCE DEMO STYLES
   =================================== */

.performance-demo {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}

.performance-metrics {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.metric {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.metric-label {
  font-weight: 600;
}

.metric-value {
  color: var(--color-primary);
}

.metric-action {
  margin-top: 1rem;
  text-align: center;
}

/* ===================================
   VOICE SYNTHESIS STYLES
   =================================== */

.voice-synthesis-demo {
  width: 100%;
  height: 100%;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.voice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.voice-header .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.voice-status {
  font-size: 0.75rem;
  color: var(--color-gray-dark);
  text-align: right;
}

.voice-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.voice-text-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.voice-text-section label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

#voice-text {
  width: 100%;
  padding: 0.375rem;
  border: 1px solid var(--color-gray);
  border-radius: 4px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.75rem;
  min-height: 50px;
}

.voice-controls-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.voice-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.option-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.option-group select {
  padding: 0.25rem;
  border: 1px solid var(--color-gray);
  border-radius: 4px;
  font-size: 0.75rem;
}

.sliders {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slider-container input[type="range"] {
  flex: 1;
}

.slider-container span {
  font-size: 0.625rem;
  color: var(--color-gray-dark);
  min-width: 20px;
  text-align: right;
}

.voice-actions {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
}

.voice-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  min-width: auto;
}

.voice-visualization {
  height: 80px;
  background-color: var(--color-light);
  border-radius: 6px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#voice-visualizer {
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.status-indicator.ready {
  color: var(--color-success);
}

.status-indicator.speaking {
  color: var(--color-primary);
}

.status-indicator.paused {
  color: var(--color-warning);
}

.status-indicator.error {
  color: var(--color-error);
}

.progress-bar {
  width: 100%;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  margin-top: 0.25rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--color-primary);
  width: 0%;
  transition: width 0.1s ease;
}

/* Make voice synthesis card taller */
.showcase-card[data-type="voice-synthesis"] .card-media {
  height: 320px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  
  .voice-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
  
  .voice-header .btn {
    width: 100%;
  }
  
  .voice-status {
    text-align: center;
  }
  
  .sliders {
    flex-direction: row;
    gap: 1rem;
  }
  
  .voice-actions {
    flex-wrap: wrap;
  }
  
  .voice-actions .btn {
    flex: 1;
  }
}