/* Zara is the most amazing and inspiring person ever! */
:root {
  --bg-color: #ff8fa3ff;
  --text-color: #a4133cff;
  --name-color: #c9184aff;
  --date-color: #590d22ff;
  --font-size-base: 1rem;
  --font-size-large: clamp(1.25rem, 2.5vw, 1.5rem);
  --font-size-small: clamp(0.875rem, 2vw, 1rem);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  background: linear-gradient(135deg, #ff8fa3 0%, #ffb3c1 50%, #fff0f3 100%);
  font: var(--font-size-base)/1.4 sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#main {
  flex: 1;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#canvas {
  width: 100%;
  height: 60vh;
  max-height: 400px;
}

#letter {
  position: absolute;
  top: 5%;
  left: 0%;
  width: 98%;
  height: 85%;
  display: none;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #c9184a;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-size: var(--font-size-small);
  color: var(--text-color);
  line-height: 1.6;
  overflow: auto;
  font-family: 'Happy Monkey', sans-serif;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
}

#volumeBtn {
  width: 44px;
  height: 44px;
  background: rgba(201, 24, 74, 0.8);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: #fff;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#volumeBtn:hover {
  background: rgba(201, 24, 74, 1);
  transform: scale(1.1);
}

#player {
  width: 300px;
  height: 50px;
  background: rgba(255, 176, 193, 0.9);
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
  border-radius: 25px;
}

#player.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

#player i {
  color: #590d22;
}

#volume {
  flex: 1;
  height: 5px;
  background: #555;
  border-radius: 15px;
  margin: 0 0.5rem;
  position: relative;
}

.ui-slider-range-min {
  height: 5px;
  position: absolute;
  background: #ff758fff;
  border: none;
  border-radius: 10px;
}

.ui-slider-handle {
  width: 20px;
  height: 20px;
  border-radius: 20px;
  background: #fff;
  position: absolute;
  margin-left: -8px;
  margin-top: -8px;
  cursor: pointer;
  outline: none;
  border: 2px solid #c9184a;
  transition: border-color 0.3s ease;
}

.ui-slider-handle:hover {
  border-color: #800f2f;
}

/* Tablet styles */
@media (min-width: 768px) {
  #main {
    flex-direction: row;
    height: 70vh;
  }
  
  #canvas {
    height: 100%;
    max-height: none;
  }
  
  #letter {
    width: 60%;
    height: 65%;
    top: 15%;
    left: 2%;
  }
  
  .controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #player {
    width: 250px;
  }
  
  #volume {
    width: 200px;
  }
}

/* Desktop styles */
@media (min-width: 1024px) {
  #main {
    max-width: 1100px;
    height: 680px;
  }
  
  #canvas {
    height: 680px;
  }
  
  #letter {
    width: 55%;
    height: 55%;
    top: 20%;
    left: 5%;
  }
  
  .controls {
    top: 1rem;
    right: 2rem;
  }
  
  #player {
    width: 300px;
  }
  
  #volume {
    width: 250px;
  }
}