/* =========================================================
   Aztec Karaoke — Neon Title + Sleek Cards
   ========================================================= */

:root {
  --bg: #120022;          /* deep Aztec purple */
  --card: #1f0a1f;        /* wine/purple card */
  --accent: #C6FF00;      /* lime neon */
  --highlight: #FF6F61;   /* coral red/orange */
  --purple: #7d3cff;      /* Aztec purple */
  --text: #f5f5f5;        /* soft white */
  --muted: #aaa;          /* muted gray */
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0 20px 40px;
  text-align: center;
}

body {
  background: linear-gradient(-45deg, #120022, #1a0033, #2a003f, #1e0033);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Title at very top */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 800;
  margin: 25px auto 15px;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--highlight));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  letter-spacing: 1px;
}

/* Subtitle */
.subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 30px;
  padding: 10px 15px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-style: italic;
}

/* Theme toggle top-right */
#themeToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
#themeToggle:hover {
  background: var(--highlight);
  color: #111;
}

/* Inputs row */
.input-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
input {
  padding: 12px;
  width: 230px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  text-align: center;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}
input::placeholder {
  color: var(--muted);
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  outline: none;
}

/* Buttons row */
.button-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
button {
  padding: 11px 20px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
#startBtn { background: var(--accent); color: #111; }
#stopBtn { background: var(--highlight); color: #fff; }
#saveBtn { background: var(--purple); color: #fff; }

/* Status indicators */
#recordingIndicator {
  display: none;
  color: var(--highlight);
  margin-top: 5px;
  font-weight: bold;
}
#stoppedIndicator {
  display: none;
  color: var(--accent);
  margin-top: 5px;
  font-weight: bold;
}

/* Gallery header */
.gallery-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 40px auto 20px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}



.gallery-title::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  margin: 6px auto 0;
  background: linear-gradient(90deg, #C6FF00, #7d3cff, #ff3d6a);
  border-radius: 2px;
  background-size: 300% 100%;
  animation: slideGradient 4s linear infinite;
}

@keyframes slideGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
/* Gallery layout */
#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: auto;
}

/* Clip Card */
.clip {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px;
  transition: transform 0.2s ease, border 0.3s ease;
}
.clip:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

/* Clip header pills */
.clip-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.label-recorded {
  background: var(--accent);
  color: #111;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}
.label-username {
  background: var(--purple);
  color: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  text-decoration: none;
}
.label-username:hover {
  background: var(--highlight);
}

/* Title inside card */
.title-label {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--text);
  text-align: center;
  margin: 6px 0;
}

/* Audio player */
audio {
  width: 100%;
  border-radius: 6px;
  background: #111;
}
audio:hover {
  box-shadow: 0 0 6px var(--accent);
}

/* Modal Styling */
.modal {
  display: none; 
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #1a1a1a;
  color: #fff;
  padding: 20px 30px;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  animation: fadeIn 0.3s ease;
}

.modal-content p {
  margin: 0;
  font-weight: 600;
  color: #00ff9d;
}

#closeModal {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}


button {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Start */
#startBtn {
  background: linear-gradient(90deg, #a8ff78, #78ffd6);
}
#startBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px #78ffd6;
}

/* Stop */
#stopBtn {
  background: linear-gradient(90deg, #ff6a6a, #ff3d6a);
  color: white;
}
#stopBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px #ff3d6a;
}

/* Save */
#saveBtn {
  background: linear-gradient(90deg, #7d3cff, #ff3d6a);
  color: white;
}
#saveBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #7d3cff;
}

.floating-notes {
  position: fixed;
  bottom: -50px;
  font-size: 24px;
  opacity: 0.7;
  animation: floatUp 6s linear infinite;
}

.floating-notes:nth-child(1) { left: 20%; animation-delay: 0s; }
.floating-notes:nth-child(2) { left: 50%; animation-delay: 2s; }
.floating-notes:nth-child(3) { left: 80%; animation-delay: 4s; }

@keyframes floatUp {
  0%   { transform: translateY(0); opacity: 0.8; }
  50%  { opacity: 1; }
  100% { transform: translateY(-120vh); opacity: 0; }
}


.clip {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-player {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #7b2ff7, #f107a3);
  padding: 8px 12px;
  border-radius: 40px;
  color: #fff;
}

.play-btn {
  background: #ff006e;
  border: none;
  color: white;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
}

.progress {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: #fff;
}

.time {
  font-size: 0.8rem;
}

/* Notification banner */
.notification {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.5s ease, top 0.5s ease;
  z-index: 9999;
}

.notification.show {
  opacity: 1;
  top: 30px;
}

.notification.success {
  background: #4caf50;
}

.notification.error {
  background: #e53935;
}

/* ===============================
   🎧 Preview Section Styling
   =============================== */
#previewSection {
  background: linear-gradient(135deg, #2a003f, #120022);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  margin: 25px auto;
  max-width: 700px;
  text-align: center;
  animation: fadeIn 0.6s ease;
}

#previewSection h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
  display: inline-block;
}

#previewAudio {
  width: 100%;
  margin: 15px 0;
  border-radius: 10px;
  background: #111;
  box-shadow: 0 0 10px rgba(198, 255, 0, 0.3);
}

#previewSection .button-row {
  justify-content: center;
  gap: 15px;
}

#confirmSaveBtn {
  background: linear-gradient(90deg, #7d3cff, #ff3d6a);
  color: #fff;
}
#confirmSaveBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #7d3cff;
}

#reRecordBtn {
  background: linear-gradient(90deg, #a8ff78, #78ffd6);
  color: #111;
}
#reRecordBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #78ffd6;
}