/* Base page styling and centering */
body {
  margin: 0;
  padding: 40px 0;
  font-family: "Poppins", sans-serif;
  background: transparent;
  color: #fff;

  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Prevent background scrolling when the modal is open */
body.modal-open {
  overflow: hidden;
}

/* Main application container */
.container {
  width: 480px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

/* Page title */
h1 {
  margin: 0 0 8px 0;
}

/* Subtitle text under the title */
.subtitle {
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
}

/* Artist name input field */
input {
  width: 100%;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 15px;
  background: transparent;
  color: #fff;
}

/* Row holding the action buttons */
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* Shared button styling */
button {
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

/* Clickable poster preview container */
.poster-preview {
  margin-top: 20px;
  cursor: pointer;
}

/* Preview frame with rounded corners and border */
.poster-preview-inner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #333;
}

/* Subtle inner border overlay for the preview */
.poster-preview-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  pointer-events: none;
}

/* Scaled down preview canvas */
#preview_canvas {
  width: 100%;
  display: block;
}

/* Label shown at the bottom of the preview */
.preview-label {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 10px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* Full screen modal overlay for the poster */
.poster-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000000;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Visible modal state */
.poster-modal.open {
  opacity: 1;
  pointer-events: auto;
}

/* Full size poster canvas inside the modal */
#modal_canvas {
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

/* Slight zoom in animation when modal opens */
.poster-modal.open #modal_canvas {
  transform: scale(1);
}

/* Close button inside the modal */
.close-modal {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 20px;
  padding: 6px 12px;
  cursor: pointer;
}

/* Hidden canvas used for offscreen rendering */
#top5_canvas {
  display: none;
}

/* Container used to display easter egg content */
#easter_egg {
  display: none;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 8px;
  background: rgba(0,0,0,0.35);
}

/* Autocomplete dropdown container */
.autocomplete-box {
  position: absolute;
  background: rgba(0,0,0,0.9);
  border: 1px solid #444;
  border-radius: 4px;
  display: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000001;
}

/* Individual autocomplete option */
.autocomplete-item {
  padding: 10px;
  cursor: pointer;
}

/* Hover effect for autocomplete options */
.autocomplete-item:hover {
  background: rgba(255,255,255,0.1);
}
