/* Import a nice font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

/* CSS Variables */
:root {
  --bg-dark-primary: #100f12;
  --bg-dark-secondary: #1a1a20;
  --bg-dark-tertiary: #2a2a35;
  --text-primary: #f0f0f0;
  --text-secondary: #ccc;
  --accent-primary: #00f2fe; /* Bright Cyan */
  --accent-secondary: #ff00c1; /* Bright Magenta (Less used now) */
  --accent-youtube: #ff0000;
  --accent-danger: #e63946;
  --shadow-light: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
  background: var(--bg-dark-primary);
  color: var(--text-primary);
  text-align: center;
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- PARTICLE CANVAS (INDEX PAGE ONLY) --- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

/* --- NAVIGATION BAR (BOTH PAGES) --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(16, 15, 18, 0.6);
  backdrop-filter: blur(10px);
  padding: 0.75rem 2rem;
  text-align: left;
  z-index: 100;
  border-bottom: 1px solid var(--shadow-light);
  display: flex;
  align-items: center;
}

.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.navbar-logo img {
  height: 40px;
  width: 40px;
  border-radius: 6px;
  margin-right: 0.75rem;
}
.navbar-logo span {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
  background-size: 200% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ========================================= */
/* == HERO STYLES (FOR BOTH PAGES)        == */
/* ========================================= */

.hero-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.hero-section h1 {
  font-size: 20vw;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-primary);
  text-stroke: 1px var(--text-primary);
  opacity: 0.3;
  transition: all 0.3s ease-out;
}

.hero-section .tagline {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-top: -2rem;
  font-weight: 600;
  z-index: 11;
}

.main-content {
  position: relative;
  z-index: 20;
  background: var(--bg-dark-primary);
  padding-top: 4rem;
}

.scroll-prompt {
  position: absolute;
  bottom: 2rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.scroll-prompt.hidden {
  opacity: 0;
  pointer-events: none;
}
.mouse { height: 25px; width: 15px; border: 2px solid var(--text-secondary); border-radius: 10px; margin: 0.5rem auto 0; }
.mouse span { display: block; height: 5px; width: 2px; background: var(--text-secondary); border-radius: 2px; margin: 4px auto; animation: scroll-wheel 1.5s infinite ease-in-out; }
@keyframes scroll-wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

/* ========================================= */
/* == INDEX PAGE MAIN CONTENT             == */
/* ========================================= */

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.input-section {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

@keyframes breathing-glow {
  0% { box-shadow: 0 4px 15px rgba(0, 242, 254, 0.1); }
  50% { box-shadow: 0 6px 25px rgba(0, 242, 254, 0.4); }
  100% { box-shadow: 0 4px 15px rgba(0, 242, 254, 0.1); }
}

.button-primary {
  padding: 0.8rem 1.2rem;
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  background-color: transparent;
  color: var(--accent-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: breathing-glow 3s infinite ease-in-out;
  text-decoration: none;
}
.button-primary:hover {
  background-color: var(--accent-primary);
  color: var(--bg-dark-primary);
  transform: translateY(-3px);
  animation: none;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

/* General styling for result cards */
.result-card {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: 12px;
  background-color: var(--bg-dark-tertiary);
  border: 1px solid var(--shadow-light);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}
.result-card::before { /* Animated border effect */
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 12px;
  background: linear-gradient(45deg, var(--accent-primary), transparent, var(--accent-secondary));
  background-size: 200% 200%;
  animation: border-glow 6s ease infinite alternate;
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}
.result-card .card-content {
  position: relative;
  z-index: 2;
  padding: 1rem; /* Inner padding for content */
}

@keyframes border-glow {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.result-card h2 {
  color: var(--accent-primary); /* Cyan for main result titles */
  margin-bottom: 1.5rem;
  font-size: 2.2rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.song-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem 1.5rem;
  text-align: left;
  max-width: 500px;
  margin: 1.5rem auto;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}
.detail-item strong {
  color: var(--text-secondary);
  font-weight: 600;
  display: inline-block;
  width: 90px; /* Align labels */
}
.detail-item span {
  color: var(--text-primary);
  font-weight: 400;
}

@media (min-width: 600px) {
  .song-details-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.button-youtube {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  background-color: var(--accent-youtube);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}
.button-youtube:hover {
  background-color: #e60000;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 25px rgba(255, 0, 0, 0.5);
}

.highlight {
  font-size: 3.5rem; /* Larger for detected key */
  font-weight: 900;
  color: var(--accent-primary);
  text-align: center;
  text-shadow: 0 0 20px rgba(0, 242, 254, 0.7);
  letter-spacing: 2px;
  margin: 1rem 0;
  animation: pulse-text 2s infinite alternate;
}
@keyframes pulse-text {
  0% { text-shadow: 0 0 10px rgba(0, 242, 254, 0.5); transform: scale(1); }
  100% { text-shadow: 0 0 25px rgba(0, 242, 254, 0.9); transform: scale(1.02); }
}


.hidden { display: none; }
.loader {
  border: 6px solid var(--shadow-light);
  border-top: 6px solid var(--accent-primary);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#processing-section .card-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* No Match visual */
.no-match-visual {
  font-size: 4rem;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.2); /* Very subtle */
  animation: float-emoji 3s ease-in-out infinite alternate;
}
@keyframes float-emoji {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-10px) scale(1.05); }
}


footer {
  position: fixed;
  bottom: 10px;
  right: 20px;
  font-size: 0.9em;
  color: #888;
  z-index: 10;
}
.static-footer {
  margin: 4rem 0 1rem 0;
  font-size: 0.9em;
  color: #888;
  background-color: var(--bg-dark-primary);
}


/* ========================================= */
/* == ABOUT PAGE STYLES                   == */
/* ========================================= */

.about-page .hero-section h1 {
  font-size: 10vw;
  -webkit-text-stroke: 1px var(--text-primary);
  text-stroke: 1px var(--text-primary);
  color: transparent;
  opacity: 0.6;
}
.about-page .hero-section .tagline {
  color: var(--text-secondary);
  opacity: 0.8;
  margin-top: -1rem;
}

.floating-note {
  position: fixed;
  font-size: 20px;
  color: var(--accent-primary);
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  margin: 2rem 0;
}

.timeline-container::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--bg-dark-tertiary);
  z-index: 1;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.timeline-section {
  display: flex;
  justify-content: flex-end;
  position: relative;
  width: 50%;
  padding: 2rem 0;
  padding-right: 4rem;
  z-index: 10;
  align-self: flex-end;
}
.timeline-section.alt-layout {
  justify-content: flex-start;
  align-self: flex-start;
  padding-left: 4rem;
  padding-right: 0;
}

.timeline-content {
  position: relative;
  padding: 1.5rem 2rem;
  background: var(--bg-dark-secondary);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  text-align: left;
  border: 1px solid var(--bg-dark-tertiary);
}

.timeline-visual {
  position: absolute;
  top: 50%;
  right: -2rem;
  transform: translate(50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--bg-dark-primary);
  border: 3px solid var(--accent-primary);
  border-radius: 50%;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--accent-primary);
}
.timeline-section.alt-layout .timeline-visual {
  left: -2rem;
  right: auto;
  transform: translate(-50%, -50%);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-primary);
}

.timeline-content h2 {
  font-size: 2rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}
.timeline-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.cyber-border {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 12px;
  pointer-events: none;
}
.cyber-border::before, .cyber-border::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--accent-primary);
  border-style: solid;
  transition: all 0.4s ease-out;
}
.cyber-border::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 12px;
}
.cyber-border::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 12px;
}
.timeline-content:hover .cyber-border::before,
.timeline-content:hover .cyber-border::after {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
}

.creator-section .timeline-visual {
  width: 120px;
  height: 120px;
  border-width: 4px;
}
.creator-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.animate-on-scroll { opacity: 0; transform: translateX(50px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.timeline-section.alt-layout.animate-on-scroll { transform: translateX(-50px); }
.animate-on-scroll.is-visible { opacity: 1; transform: translateX(0); }

/* Visual Animations (shared with index for visual effects) */
.headphones { font-size: 3rem; animation: glow 2s ease-in-out infinite; text-shadow: 0 0 10px var(--accent-primary); }
.headphones::before { content: '🎧'; }
@keyframes glow { 0% { text-shadow: 0 0 10px var(--accent-primary), 0 0 20px var(--accent-primary); } 50% { text-shadow: 0 0 20px var(--accent-primary), 0 0 40px var(--accent-primary); } 100% { text-shadow: 0 0 10px var(--accent-primary), 0 0 20px var(--accent-primary); } }
.vision-graph { width: 100%; height: 100%; scale: 0.6; position: relative; display: flex; align-items: center; justify-content: center; }
.node { width: 15px; height: 15px; background: var(--accent-primary); border-radius: 50%; position: absolute; box-shadow: 0 0 15px var(--accent-primary); animation: pulse-node 2s infinite ease-in-out; }
.node.central { width: 25px; height: 25px; animation-delay: -1s; }
.node.node-1 { transform: translate(70px, 0); }
.node.node-2 { transform: translate(-35px, 60.6px); }
.node.node-3 { transform: translate(-35px, -60.6px); }
.line { width: 70px; height: 2px; background: linear-gradient(to right, var(--accent-primary), transparent); position: absolute; left: 75px; top: 74px; transform-origin: left center; opacity: 0.7; animation: flow 2s infinite linear; }
.line.line-1 { transform: rotate(0deg); }
.line.line-2 { transform: rotate(120deg); animation-delay: -0.66s; }
.line.line-3 { transform: rotate(240deg); animation-delay: -1.33s; }
@keyframes pulse-node { 0%, 100% { transform: scale(1); box-shadow: 0 0 15px var(--accent-primary); } 50% { transform: scale(1.1); box-shadow: 0 0 25px var(--accent-primary); } }
@keyframes flow { 0% { opacity: 0; transform: scaleX(0); } 50% { opacity: 0.8; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
.equalizer-graph { display: flex; align-items: center; justify-content: center; height: 120px; gap: 6px; scale: 0.7; }
.bar { width: 10px; background-color: var(--accent-primary); border-radius: 4px 4px 0 0; animation: animate-bar 1.5s infinite ease-in-out alternate; }
.bar:nth-child(1) { height: 60px; animation-delay: 0s; }
.bar:nth-child(2) { height: 30px; animation-delay: -0.2s; }
.bar:nth-child(3) { height: 75px; animation-delay: -0.4s; }
.bar:nth-child(4) { height: 40px; animation-delay: -0.6s; }
.bar:nth-child(5) { height: 65px; animation-delay: -0.8s; }
@keyframes animate-bar { 0% { height: 10px; opacity: 0.5; } 100% { height: 100px; opacity: 1; } }

/* --- STYLES FOR RECORDING STATUS MESSAGES (Added in previous step) --- */
.recording-wait {
  color: var(--text-secondary); /* More subtle color */
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 1rem;
}

#recording-status {
  color: var(--accent-danger);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
}
/* Style for key highlight when displayed inline with other text */
.highlight-inline {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.5rem; /* Slightly smaller than main highlight, but still prominent */
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
  margin-left: 0.5rem;
}

/* You can adjust the existing highlight style if needed, but it should be fine */
/* .highlight { ... } */
/* NEW: Style for the beta notice */
.beta-notice {
  font-size: 0.9rem; /* Slightly smaller text */
  color: var(--text-secondary); /* Less prominent color */
  margin-top: 1.5rem; /* Space below buttons */
  margin-bottom: -1rem; /* Reduce extra space before results */
  opacity: 0.8; /* Slightly faded */
}