/**
 * SoundSwarm- Collaborative Music Creation
 * Styles
 */

@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap");

/* ============================================
   Reset & Base
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Oswald", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  background: linear-gradient(
    135deg,
    #0a3d3d 0%,
    #0d4a47 25%,
    #0a3535 50%,
    #091f2c 75%,
    #0a1a24 100%
  );

  color: white;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ============================================
   Background Effects
   ============================================ */

/* Grain overlay using SVG filter */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  /*background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");*/
}

/* Subtle vignette effect */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

/* ============================================
   Visualization Canvas
   ============================================ */

#visualization {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ============================================
   Layout
   ============================================ */

.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  font-size: 3rem;
  font-weight: 200;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 16px;
}

.chord-label {
  font-size: 0.9rem;
  opacity: 0.6;
  font-weight: 500;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  opacity: 0.6;
}

/* ============================================
   Status Section
   ============================================ */

.status-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

#noteDisplay {
  font-size: 4rem;
  font-weight: 200;
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
}

#noteLabel {
  font-size: 1.2rem;
  margin-bottom: 24px;
  opacity: 0.8;
}

#statusMessage {
  font-size: 0.9rem;
  opacity: 0.6;
  margin-bottom: 32px;
  min-height: 20px;
}

/* ============================================
   Buttons
   ============================================ */

#playButton {
  background: linear-gradient(135deg, #00b7be 0%, #007a7f 100%);
  border-color: #00b7be;
  color: white;
  border: none;
  padding: 18px 48px;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

#playButton:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

#playButton:active:not(:disabled) {
  transform: translateY(0);
}

#playButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   Controls Overlay
   ============================================ */

.controls-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.controls-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   Controls Section
   ============================================ */

.controls-section {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 45, 45, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 24px 24px 0 0;
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 999;
  max-height: 70vh;
  overflow-y: auto;
}

.controls-section.open {
  transform: translateY(0);
}

.control-group {
  margin-bottom: 32px;
}

.control-group h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 12px;
}

.button-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.control-button {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 70px;
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.control-button.active {
  background: linear-gradient(135deg, #00b7be 0%, #007a7f 100%);
  border-color: #00b7be;
}

.control-button:disabled {
  opacity: 0.3;
  pointer-events: none;
}

#detuneDisplay {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 8px;
}

/* ============================================
   Menu Toggle Button
   ============================================ */

#menuToggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    url("src/Sliders.svg") no-repeat center,
    linear-gradient(135deg, #00b7be 0%, #007a7f 100%);
  background-size:
    24px 24px,
    100% 100%;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

#menuToggle:hover {
  transform: scale(1.1);
}

#menuToggle.open {
  background:
    url("src/Close.svg") no-repeat center,
    linear-gradient(135deg, #00b7be 0%, #007a7f 100%);
  background-size:
    24px 24px,
    100% 100%;
  transform: rotate(45deg);
}

/* ============================================
   Shuffle Note Button
   ============================================ */

#shuffleNoteButton {
  background: linear-gradient(135deg, #00b7be 0%, #007a7f 100%);
  border-color: #00b7be;
  color: white;
}

#shuffleNoteButton:hover:not(:disabled) {
  background: linear-gradient(135deg, #00b7be 0%, #007a7f 100%);
  border-color: #00b7be;
}
