/* Introduction presentation specific styles */

/* Title slide logo positioning */
.title-slide .ui-logo {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 330px;
  z-index: 10;
}

/* Adjust title position to account for logo */
.title-slide h1 {
  margin-top: 240px;
}

/* Parameter colors - Using University of Iceland brand colors */
:root {
  --param-a1: #10099F;    /* UI Blue */
  --param-b1: #2DD2C0;    /* UI Teal */
  --param-a2: #FC8484;    /* UI Coral */
  --param-b2: #FFA05F;    /* UI Orange */
  --param-a3: #FAC55B;    /* UI Yellow */
}

/* Color coding for parameters */
.param-a1 { color: var(--param-a1) !important; }
.param-b1 { color: var(--param-b1) !important; }
.param-a2 { color: var(--param-a2) !important; }
.param-b2 { color: var(--param-b2) !important; }
.param-a3 { color: var(--param-a3) !important; }

/* Horizontal layout for demo */
.interactive-demo.horizontal-layout {
  display: flex;
  gap: 25px;
  align-items: center;
  margin: 20px auto;
  max-width: 1100px;
  height: auto;
  justify-content: center;
}

/* Retro device styling for tuner demo */
.retro-device {
  background: transparent;
  border-radius: 20px;
  padding: 15px;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

.retro-device.compact {
  padding: 8px 12px;
  min-width: 300px;
  max-width: 360px;
  flex: 0 0 auto;
}

/* Removed shimmer effect since we removed the background */

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

/* Formula display */
.formula-display {
  background: #F5F5F5;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
  text-align: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #EEEEEE;
}

.formula-display.centered {
  max-width: 800px;
  margin: 0 auto 10px auto;
}

.formula {
  font-size: 0.8em;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.formula span {
  font-weight: bold;
  text-shadow: 0 0 2px currentColor;
}

/* Tuner controls */
.control-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tuner-group {
  background: linear-gradient(135deg, #FFFFFF, #F5F5F5);
  border-radius: 6px;
  padding: 4px 6px;
  box-shadow: 
    inset 1px 1px 3px rgba(0,0,0,0.05),
    0 1px 2px rgba(0,0,0,0.1);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #EEEEEE;
}

.tuner-group.compact {
  padding: 3px 6px;
}

.tuner-group label {
  font-size: 0.8em;
  font-weight: bold;
  text-shadow: 0 0 2px currentColor;
  font-family: 'Courier New', monospace;
  width: 22px;
  flex-shrink: 0;
  text-align: left;
}

/* Custom range slider styling */
.tuner {
  -webkit-appearance: none;
  width: 120px;
  height: 20px;
  background: transparent;
  outline: none;
  margin: 0;
  flex: 0 0 120px;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.tuner::-webkit-slider-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #EEEEEE, #E0E0E0);
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.tuner::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #FAC55B, #FFA05F);
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 
    0 0 10px rgba(250, 197, 91, 0.5),
    0 2px 5px rgba(0,0,0,0.2);
  position: relative;
  top: -6px;
  transition: all 0.2s ease;
}

.tuner::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 
    0 0 20px rgba(250, 197, 91, 0.8),
    0 2px 5px rgba(0,0,0,0.3);
}

.tuner::-moz-range-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #EEEEEE, #E0E0E0);
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.tuner::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #FAC55B, #FFA05F);
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 
    0 0 10px rgba(250, 197, 91, 0.5),
    0 2px 5px rgba(0,0,0,0.2);
  border: none;
  transition: all 0.2s ease;
}

.tuner-value {
  font-size: 0.7em;
  text-shadow: 0 0 1px currentColor;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  width: 40px;
  text-align: right;
  flex-shrink: 0;
  margin-left: 3px;
}

/* Demo controls section */
.demo-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 15px;
  background: #F5F5F5;
  border-radius: 8px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid #EEEEEE;
}

.button.compact {
  padding: 3px 6px;
  font-size: 0.6em;
  margin: 0;
  white-space: nowrap;
}

.gradient-button {
  background: linear-gradient(135deg, #10099F, #2DD2C0);
  color: white;
}

/* Error display */
.error-display {
  font-size: 0.7em;
  font-family: 'Courier New', monospace;
  padding: 6px 12px;
  background: #FFFFFF;
  border: 1px solid #EEEEEE;
  border-radius: 4px;
  transition: color 0.3s ease;
  white-space: nowrap;
  text-align: center;
  color: #262626;
}

#error-value {
  font-weight: bold;
}

/* Function graph container */
#function-graph,
#overfit-graph {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #EEEEEE;
  flex: 1;
  min-width: 350px;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Course roadmap styling */
.course-roadmap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-roadmap h3 {
  color: var(--color-accent);
  font-size: 1.1em;
  margin-bottom: 0.5em;
}

.course-roadmap ul {
  font-size: 0.9em;
  line-height: 1.6;
}

/* Animation for fragments appearing */
.reveal .fragment.visible {
  animation: slideInFade 0.5s ease-out;
}

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

/* Special styling for the mini challenge */
.reveal h4 {
  color: var(--color-accent);
}

/* SVG inside function graph */
#function-graph svg,
#overfit-graph svg {
  max-width: 100%;
  height: auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .interactive-demo.horizontal-layout {
    flex-direction: column;
    height: auto;
    align-items: center;
  }
  
  .retro-device.compact {
    max-width: 400px;
    width: 100%;
  }
  
  #function-graph,
  #overfit-graph {
    margin-top: 20px;
    min-width: 300px;
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .tuner-row {
    flex-direction: column;
    align-items: center;
  }
  
  .tuner-group {
    width: 80%;
    max-width: 300px;
  }
  
  .retro-device {
    padding: 20px;
  }
}

/* Loading animation for demo initialization */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(52, 152, 219, 0.8);
  }
}

.interactive-demo.loading {
  animation: pulse-glow 2s infinite;
}

/* Style for emphasis boxes */
.reveal .emphasis-box {
  animation: none;
  transition: all 0.3s ease;
}

.reveal .emphasis-box:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}