html {
  font-size: 20px; /* Use the mobile size everywhere */
}

body {
  background-color: #171717;
  font-family: verdana;
  color: white;
  font-size: 1rem;
  line-height: 1.5;
}

h2 {
  font-size: 1.5rem; /* For the status text */
}

small {
  user-select: none;
  font-size: 0.875rem;  /* Instead of browser default */
}

a {
  color: white;
}

button {
  background-color: #171717;
  color: white;
}

span {
  user-select: none;
}

.center {
  background-color: #171717;
  display: flex; /* Add flex display to center the chat-container */
  flex-direction: column; /* Stack children vertically */
  justify-content: center; /* Vertically center the chat-container */
  align-items: center; /* Horizontally center the chat-container */
  padding: 0.625rem; /* 10px */
  margin-top: 2rem;    /* Added top margin to the whole layout */
  text-align: center;
}

/* -------- main page - START ---------- */
/* Modern Play/Pause Button Styles */
.player-control-container {
  margin: 0 auto 1rem auto;  /* top right bottom left - this gives bottom margin of 1rem */
  max-width: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  width: 100%;
  position: relative;
}

.play-pause-button {
  width: 8rem;
  height: 8rem;
  aspect-ratio: 1/1; /* Maintain square shape */
  border-radius: 50%;
  background-color: #4285f4;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
  /* Add shadow for depth */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 2; /* Ensure button appears above timeline */
}

.play-pause-button:hover {
  background-color: #2a75f3;
}

.audio-player {
  width: 100%;  /* Take full width of parent container */
  max-width: 18.75rem;  /* But don't exceed this width */
  padding: 0.625rem;
}

/* Update the player container to be responsive */
.player-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;  /* Take 90% of center container width */
  max-width: 18.75rem;
  margin: 0 auto;
}

.control-icon {
  width: 60%; /* Icon takes up 50% of the button's dimensions */
  height: 60%;
  fill: currentColor;
}

/* Playing state */
.play-pause-button.playing #pause-icon {
  display: block !important;
}
.play-pause-button.playing #play-icon,
.play-pause-button.playing #loading-icon {
  display: none !important;
}

/* Paused state */
.play-pause-button.paused #play-icon {
  display: block !important;
}
.play-pause-button.paused #pause-icon,
.play-pause-button.paused #loading-icon {
  display: none !important;
}

/* Error state */
.play-pause-button.error #error-icon {
  display: block !important;
}
.play-pause-button.error #play-icon,
.play-pause-button.error #pause-icon,
.play-pause-button.error #loading-icon {
  display: none !important;
}



.navigation-button {
  cursor: pointer;
  user-select: none;
}

.icon-button {
  color: white;
  font-size: 1rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  user-select: none;
}

.custom-button {
  border: 1px solid #333;
  font-size: 1rem;
  border-radius: 2rem;      /* Using rem instead of px */
  padding: 0.75rem 1rem;    /* Using rem instead of px */
  margin: 0.2rem;           /* Using rem instead of px */
  text-align: center;
  color: white;
  cursor: pointer;
}

/* Add this new container class */
.navigation-controls {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 18.75rem;
  margin: 1rem auto 0 auto;
}

.title-row {
  width: 100%;
  display: flex;
  align-items: center;
  border: 1px solid #333;
  border-radius: 1.5rem 1.5rem 0 0;
  background: #171717;
  height: 3.5rem;
  box-sizing: border-box;
  overflow: hidden;
}

.arrow-l-button, .arrow-r-button {
  flex: 1;
  border: 1px solid #333;
  border-top: none;
  font-size: 1rem;
  padding: 0.75rem 0.5rem;
  margin: 0 0.2rem;
  text-align: center;
  color: white;
  cursor: pointer;
}

.arrow-l-button {
  border-radius: 0 0 0 1.5rem;
  margin: 0;
}

.arrow-r-button {
  border-radius: 0 0 1.5rem 0;
  border-left: none;
  margin: 0;
}

.title-row .arrow-m-button {
  width: 100%;
  border: 1px solid #333;
  border-radius: 1.5rem 1.5rem 0 0;
  margin: 0;
  background: #171717;
  font-size: 1rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  box-sizing: border-box;
}

.arrows-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

/* Add this rule for the content inside the button */
.arrow-m-button span {
  max-width: 100%;
  max-height: 100%;
  display: block;
}


/* -------- audio player - START ---------- */
.timeline {
  background: #e0e0e0;
  width: 100%;
  height: 0.25rem;  /* Instead of 4px */
  border-radius: 0.125rem;  /* Instead of 2px */
  cursor: pointer;
  position: relative;
}

/* This is a pseudo-element that creates the larger clickable area */
.timeline::before {
  content: ""; /* Necessary for pseudo-elements to be generated */
  position: absolute;
  left: 0;
  right: 0;
  top: -8px; 
  bottom: -8px;
  background: transparent;
  cursor: pointer;
}

.progress {
  background: #007bff;
  width: 0%;
  height: 100%;
  border-radius: 2px;
  position: absolute;
}
.time {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;  /* Instead of 12px */
  margin-top: 0.3125rem;  /* Instead of 5px */
  color: #666;
}
/* -------- audio player - END ---------- */


/* -------- cookie banner - START ---------- */
.c-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 50%; /* Position the box at 50% from the left edge of the viewport */
  transform: translateX(-50%); /* Center the box horizontally */
  width: 100%;
  background-color: #333;
  color: #fff;
  padding: 1.25rem;  /* Instead of 20px */
  text-align: center;
}
.c-banner button {
  background-color: #007bff;
  color: #fff;
  border: none;
  margin-top: 0.3125rem;  /* Instead of 5px */
  padding: 0.75rem 1rem;    /* Using rem instead of px */
  border-radius: 2rem;
  cursor: pointer;
  display: inline-block;
}
/* -------- cookie banner - END ---------- */

.center-wrapper {
  background-color: #171717;
  margin-left: 1rem;  /* Instead of 10px */
  margin-right: 1rem; /* Instead of 10px */
  display: inline-block;
}

/* Loading spinner */
#loading-icon {
  display: none;
  width: 4rem;
  height: 4rem;
}

.play-pause-button.loading #loading-icon {
  display: block !important;
}

.loading-spinner {
  animation: rotate 2s linear infinite;
}

.loading-spinner .path {
  stroke: white;
  stroke-linecap: round;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

.nav-icon {
  width: 24px;
  height: 24px;
  fill: currentColor; /* This will make the icon inherit the text color */
  vertical-align: middle;
}

/* Optional: Add a subtle transition for hover effects */
.custom-button, .arrow-l-button, .arrow-m-button, .arrow-r-button {
  transition: background-color 0.2s;
}

.custom-button:hover, .arrow-l-button:hover, .arrow-m-button:hover, .arrow-r-button:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Subtle highlight on hover */
}

@media (hover: none) {
  /* This targets devices that don't support hover */
  .custom-button:hover, 
  .arrow-l-button:hover, 
  .arrow-m-button:hover, 
  .arrow-r-button:hover {
    /* Disable hover effects on these buttons */
    background-color: transparent !important;
  }
  
  /* Special handling for the play button to maintain its blue color */
  .play-pause-button:hover {
    background-color: #4285f4 !important; /* Keep the original blue */
  }
}

#btn-back, #btn-exit {
  padding: 0.4rem 0.8rem;
  border-radius: 3rem;
}

/* Menu Styling */
.menu {
  display: none; /* Hidden by default */
  width: 100%;
  max-width: 18.75rem;
  margin: 0 auto;
}

/* This class will be toggled via JavaScript */
.menu.visible {
  display: block;
}

/* Hamburger Menu Button Styling */
.hamburger-menu-button {
  background-color: transparent;
  border: 1px solid #333;
  border-radius: 2rem;
  padding: 0.75rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 3.5rem;
  height: 3.5rem;
  transition: background-color 0.2s;
}

.hamburger-menu-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

.hamburger-menu-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Make the button container consistent with other elements */
.input-container {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 18.75rem;
  margin: 0.5rem auto;
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .hamburger-menu-button:hover {
    background-color: transparent !important;
  }
}
/* -------- main page - END ---------- */


/* --------- Navigation - START --------- */
.fixed-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #171717;
  z-index: 1001;
  padding: 0.625rem 0; /* 10px 0 */
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3); /* 0 2px 4px */
  display: flex;
  justify-content: center;
}
.nav-spacer {
  height: 3.75rem; /* 60px */
}
/* --------- Navigation - END --------- */


/* -------- review section - START ---------- */
.textarea-input {
  background-color: #171717;
  color: white;
  border: 1px solid #333;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin: 0.75rem auto;
  width: 90%;
  max-width: 30rem;
  font-family: verdana;
  font-size: 1rem;
  resize: vertical;
}

/* Customize the scrollbar */
.textarea-input::-webkit-scrollbar {
  width: 0.5rem;
}
.textarea-input::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 0.25rem;
}
.textarea-input::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

.rating-scale {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rating-scale button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.2s, color 0.2s;
}

.rating-scale button:hover {
  transform: scale(1.1);
}

.rating-scale button.selected {
  transform: scale(1.1);
}

.rating-icon {
  width: 2.5rem;
  height: 2.5rem;
}

/* Media query for smaller screens */
@media (max-width: 480px) {
  .rating-scale {
    gap: 0.25rem;
  }
  
  .rating-scale button {
    font-size: 2rem;
    padding: 0.25rem;
  }
}
/* -------- review section - END ---------- */


/* -------- settings page - START ---------- */
.settings-select {
  border: 1px solid #333;
  border-radius: 2rem;      /* Using rem instead of px */
  padding: 0.75rem 1rem;    /* Using rem instead of px */
  margin: 0.2rem;           /* Using rem instead of px */
  text-align: center;
  background-color: #171717;
  color: white;
  font-size: 1rem;
}
.save-button {
  border: 1px solid #333;
  border-radius: 2rem;      /* Using rem instead of px */
  padding: 0.75rem 1rem;    /* Using rem instead of px */
  margin: 0.2rem;           /* Using rem instead of px */
  text-align: center;
  background-color: #007bff;
  color: white;
  font-size: 1rem;
  cursor: pointer; /* Makes it clear that the element is clickable */
}
/* -------- settings page - END ---------- */

#title-image {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 1.5rem 0 0 0;
  flex-shrink: 0;
}

#title-text-container {
  flex: 1;
  display: flex;
  padding-left: 1rem;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  outline: none;
  border: none;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

#title-text {
  color: white;
  width: max-content;
  padding-left: 0.5rem;
  text-align: left;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  position: absolute;
  left: 0;
  will-change: transform, opacity;
  opacity: 1;
  transition: opacity 0.5s;
}

#title-text.scrolling {
  animation: textMarquee 8s linear 1;
}

#title-text.fade-out {
  opacity: 0;
}

#title-text.fade-in {
  opacity: 1;
}

@keyframes textMarquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

#title-text.pingpong {
  animation: textPingPong var(--pingpong-duration, 6s) ease-in-out 1;
}

@keyframes textPingPong {
  0% {
    transform: translateX(0);
  }
  55% { /* Slower scroll to left */
    transform: translateX(var(--pingpong-translate, 0));
  }
  70% { /* Pause at end */
    transform: translateX(var(--pingpong-translate, 0));
  }
  100% { /* Faster scroll back to start */
    transform: translateX(0);
  }
}

/* Modal Overlay */
.modal-overlay {
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.8); /* Black w/ opacity */
  display: flex; /* For centering content */
  align-items: center;
  justify-content: center;
}

/* Modal Content (the image) */
.modal-content-image {
  display: block;
  margin: auto;
  max-width: 80%;
  max-height: 80vh; /* 80% of viewport height */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Close Button */
.modal-close-button {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  user-select: none;
}

.modal-close-button:hover,
.modal-close-button:focus {
  color: #bbb;
  text-decoration: none;
}

/* Loading Overlay - copied from styles-explore.css */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(17, 17, 17);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.1s ease-out;
  flex-direction: column;
}

.lds-overlay {
  width: 80px;
  height: 80px;
  position: relative;
}

.lds-overlay div {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: lds-overlay 1.2s linear infinite;
}
.lds-overlay div:nth-child(1) { animation-delay: 0s; top: 37px; left: 66px; }
.lds-overlay div:nth-child(2) { animation-delay: -0.1s; top: 22px; left: 62px; }
.lds-overlay div:nth-child(3) { animation-delay: -0.2s; top: 11px; left: 52px; }
.lds-overlay div:nth-child(4) { animation-delay: -0.3s; top: 7px; left: 37px; }
.lds-overlay div:nth-child(5) { animation-delay: -0.4s; top: 11px; left: 22px; }
.lds-overlay div:nth-child(6) { animation-delay: -0.5s; top: 22px; left: 11px; }
.lds-overlay div:nth-child(7) { animation-delay: -0.6s; top: 37px; left: 7px; }
.lds-overlay div:nth-child(8) { animation-delay: -0.7s; top: 52px; left: 11px; }
.lds-overlay div:nth-child(9) { animation-delay: -0.8s; top: 62px; left: 22px; }
.lds-overlay div:nth-child(10) { animation-delay: -0.9s; top: 66px; left: 37px; }
.lds-overlay div:nth-child(11) { animation-delay: -1s; top: 62px; left: 52px; }
.lds-overlay div:nth-child(12) { animation-delay: -1.1s; top: 52px; left: 62px; }

@keyframes lds-overlay {
  0%, 20%, 80%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}
