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

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.header p {
  font-size: 1rem;
  color: #a0a0b3;
  font-weight: 400;
}

.upload-section {
  margin-bottom: 2rem;
}

.file-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.file-upload-area {
  border: 2px dashed #4a5568;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  position: relative;
}

.file-upload-area:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
  transform: translateY(-2px);
}

.file-upload-area.dragover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

.file-upload-area.loaded {
  border-color: #48bb78;
  background: rgba(72, 187, 120, 0.1);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.upload-text strong {
  font-size: 1.1rem;
  color: #ffffff;
}

.upload-text span {
  color: #a0a0b3;
  font-size: 0.85rem;
}

.file-status {
  font-size: 0.8rem;
  color: #a0a0b3;
  padding: 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.file-status.loaded {
  color: #48bb78;
  background: rgba(72, 187, 120, 0.15);
}

.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 200px;
}

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

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 0%;
  transition: width 0.1s linear;
}

.time-display {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  color: #a0a0b3;
  min-width: 80px;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-label {
  font-size: 0.9rem;
}

.volume-slider {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #667eea;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.visualizer-container {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
}

.note-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.current-notes {
  font-size: 1.1rem;
  font-weight: 600;
  color: #667eea;
}

.stats {
  font-size: 0.9rem;
  color: #a0a0b3;
}

/* Clean Grid Visualizer */
.grid-visualizer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40vh;
  padding: 2rem;
}

.grid-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 4rem);
  grid-template-rows: repeat(3, 4rem);
  gap: 0.75rem;
}

.grid-cell {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.grid-cell:hover {
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

/* Colorful border intensity levels */
.grid-cell.intensity-1 {
  border-color: #667eea;
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
}

.grid-cell.intensity-2 {
  border-color: #ffa500;
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.6);
}

.grid-cell.intensity-3 {
  border-color: #ff4500;
  box-shadow: 0 0 15px rgba(255, 69, 0, 0.6);
}

.grid-cell.intensity-4 {
  border-color: #ff1493;
  box-shadow: 0 0 15px rgba(255, 20, 147, 0.6);
}

.grid-cell.active {
  transform: scale(1.1);
}

/* Pulsing animation */
@keyframes cell-pulse {
  0% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1.1);
  }
}

.grid-cell.pulsing {
  animation: cell-pulse 0.3s ease-in-out;
}

/* Rhythmic beat indicators */
@keyframes beat-flash {
  0% {
    box-shadow: 0 0 20px currentColor;
  }
  50% {
    box-shadow: 0 0 40px currentColor;
  }
  100% {
    box-shadow: 0 0 20px currentColor;
  }
}

.grid-cell.beat {
  animation: beat-flash 0.3s ease-in-out;
}

/* Updated Grid Visualizer Layout */
.grid-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  min-height: 50vh;
  padding: 2rem;
}

.grid-section {
  display: grid;
  gap: 0.75rem;
}

.top-grid {
  grid-template-columns: repeat(3, 4rem);
  grid-template-rows: repeat(2, 4rem);
}

.bottom-grid {
  grid-template-columns: repeat(3, 4rem);
  grid-template-rows: 4rem;
}

.stickman-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.stickman-container:hover {
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

#stickmanSvg {
  filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3));
  transition: all 0.3s ease;
}

#stickmanSvg path {
  stroke: #667eea;
  stroke-width: 0.5px;
  fill: none;
}

.guitar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.guitar-container:hover {
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

#svg1 {
  filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.2));
  transition: all 0.3s ease;
}

/* Fullscreen styles for guitar container */
.guitar-container:fullscreen {
  background-color: blank; /* Light gray background */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* WebKit browsers (Chrome, Safari) */
.guitar-container:-webkit-full-screen {
  background-color: blank;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Mozilla Firefox */
.guitar-container:-moz-full-screen {
  background-color: blank;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Microsoft Edge */
.guitar-container:-ms-fullscreen {
  background-color: blank;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Ensure the SVG is properly sized in fullscreen */
.guitar-container:fullscreen svg,
.guitar-container:-webkit-full-screen svg,
.guitar-container:-moz-full-screen svg,
.guitar-container:-ms-fullscreen svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .header h1 {
    font-size: 2rem;
  }

  .file-upload-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .controls {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .progress-container {
    width: 100%;
    order: 3;
  }

  .grid-wrapper {
    grid-template-columns: repeat(3, 3.5rem);
    grid-template-rows: repeat(3, 3.5rem);
    gap: 0.6rem;
  }

  .grid-cell {
    width: 3.5rem;
    height: 3.5rem;
  }

  .grid-visualizer {
    padding: 1rem;
    min-height: 30vh;
  }

  .top-grid,
  .bottom-grid {
    grid-template-columns: repeat(3, 3.5rem);
  }

  .top-grid {
    grid-template-rows: repeat(2, 3.5rem);
  }

  .bottom-grid {
    grid-template-rows: 3.5rem;
  }

  #stickmanSvg {
    width: 100px;
    height: 120px;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.8);
}
