/* ===== General Page Styling ===== */
html {
  background-color: #0f1724; /* Fallback color */
  background-image: url("background.png"); /* Use the correct repeating pattern */
  background-attachment: fixed; /* This makes the background stay in place */
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: transparent; /* Let the html background show through the body's padding */
  color: #e6eef8;
  margin: 0;
  padding: 20px;
}

/* ===== Layout ===== */
.container {
  /* background-color: #0f1724; */ /* We'll move this to the .item */
  max-width: 760px;
  margin: 0 auto;
}

/* ===== Header ===== */
h1 {
  margin: 0 0 20px;
  font-size: 26px;
  text-align: center;
  color: #ffffff;
}

/* ===== Gallery Items ===== */
.item {
  background: #0f1724; /* Use the solid background color here */
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.item:hover {
  transform: translateY(-3px);
  /* Optional: add a subtle hover effect if desired */
}

/* ===== Metadata ===== */
.meta {
  font-size: 12px;
  color: #9fb0c8;
  margin-bottom: 8px;
}

/* ===== Media Elements ===== */
img,
video {
  width: 100%;
  max-height: 650px;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
  display: block;
}

/* ===== Captions ===== */
.caption {
  margin-top: 8px;
  font-size: 14px;
  color: #d7e9ff;
  white-space: pre;
}

/* ===== Small Text ===== */
.small {
  font-size: 12px;
  color: #9fb0c8;
  text-align: center;
}

/* ===== Loading Indicator ===== */
.loading {
  text-align: center;
  color: #9fb0c8;
  margin-top: 30px;
  font-size: 14px;
}

/* === Music Player Styling === */
.music-player {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1724;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* button on the left */
  gap: 14px;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.music-btn {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: #1b2638;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 0 5px #000, 0 2px 5px rgba(0, 0, 0, 0.4);
}

.music-btn:hover {
  background: #22314a;
  transform: scale(1.05);
}

/* Triangle (play) */
.music-btn .play-icon {
  width: 0;
  height: 0;
  border-left: 14px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 2px;
}

/* Pause icon (two bars) */
.music-btn .pause-icon {
  display: flex;
  gap: 4px;
}

.music-btn .pause-icon div {
  width: 5px;
  height: 16px;
  background: #fff;
  border-radius: 2px;
}

/* Spinner for loading state */
.music-btn.loading {
  pointer-events: none; /* Disable clicks while loading */
}

.music-btn.loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}


.music-label {
  font-size: 14px;
  color: #9fb0c8;
}

.music-title {
  font-size: 14px;
  color: #d7e9ff;
  animation: scrollText 10s linear infinite;
  display: inline-block;
  padding-left: 15px;
}

.scroll-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.scroll-text span {
  display: inline-block;
  animation: scroll-back-and-forth 15s ease-in-out infinite alternate;
  animation-play-state: paused; /* Start paused */
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


@keyframes scroll-back-and-forth {
  from { transform: translateX(0%); }
  to { transform: translateX(calc(-100% + 100%)); }
}

.google-form-block {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1724;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  font-size: 14px;
  color: #d7e9ff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.google-form-block:hover {
  background: #1a2436;
  transform: scale(1.02);
}

.form-label {
  font-weight: 500;
  white-space: pre;
}

/* Make YouTube iframes responsive while keeping original aspect ratio */
.item iframe {
  width: 100%;
  height: auto;
  max-height: 650px;       /* optional max height */
  border-radius: 8px;
  display: block;
}

/* Optional: wrap iframe in a responsive container to force correct aspect ratio */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio (9/16 = 0.5625) */
  height: 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}