@tailwind base;
@tailwind components;
@tailwind utilities;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #000;
  color: #a1a1aa;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
}
.app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  position: relative;
  overflow: hidden;
}
.bg-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(147, 51, 234, 0.2),
    #000,
    #000
  );
  pointer-events: none;
}
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  z-index: 10;
}
.content-inner {
  max-width: 896px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.hero {
  text-align: center;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(135deg, #9333ea, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(147, 51, 234, 0.3);
  position: relative;
}
.hero-icon svg {
  color: #fff;
  width: 40px;
  height: 40px;
}
.hero-icon .ping {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: none;
}
.hero h1 {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.hero p {
  color: #52525b;
  font-size: 14px;
}
.progress-card {
  background: #000;
  border: 1px solid rgba(0, 255, 0, 0.3);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  display: none;
}
.progress-card .bg-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(0, 255, 0, 0.1);
  transition: width 0.5s;
}
.progress-card .inner {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.progress-card .inner .left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-card .inner .left svg {
  color: #00ff00;
  animation: spin 1s linear infinite;
}
.progress-card .inner .left .info .title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.progress-card .inner .left .info .prompt {
  font-size: 12px;
  color: #a1a1aa;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-card .inner .percent {
  color: #33ff33;
  font-family: monospace;
  font-size: 14px;
}
.controls-card {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.controls-card label {
  font-size: 12px;
  font-weight: 700;
  color: #52525b;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.controls-card textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
  resize: none;
  height: 96px;
  transition: border-color 0.3s;
}
.controls-card textarea:focus {
  border-color: rgba(147, 51, 234, 0.5);
}
.controls-card textarea:disabled {
  opacity: 0.5;
}
.slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.slider-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #52525b;
  text-transform: uppercase;
  margin-bottom: 0;
}
.slider-row .value {
  font-size: 12px;
  color: #a855f7;
  font-family: monospace;
}
input[type="range"] {
  width: 100%;
  accent-color: #a855f7;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  margin-top: 8px;
}
input[type="range"]:disabled {
  opacity: 0.5;
}
.gen-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #9333ea, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
}
.gen-btn:hover {
  background: linear-gradient(135deg, #a855f7, #6366f1);
}
.gen-btn:active {
  transform: scale(0.95);
}
.gen-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.genre-card {
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(255, 255, 255, 0.02);
}
.genre-card:hover {
  border-color: rgba(147, 51, 234, 0.3);
  background: rgba(147, 51, 234, 0.05);
}
.genre-card.selected {
  border-color: #9333ea;
  background: rgba(147, 51, 234, 0.12);
}
.genre-card .icon {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}
.genre-card .name {
  font-size: 10px;
  color: #a1a1aa;
  font-weight: 500;
}
.mood-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.mood-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: none;
  color: #52525b;
  cursor: pointer;
  transition: all 0.15s;
}
.mood-pill:hover {
  border-color: rgba(147, 51, 234, 0.3);
  color: #d4d4d8;
}
.mood-pill.selected {
  background: rgba(147, 51, 234, 0.12);
  border-color: #9333ea;
  color: #c084fc;
}
.bpm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.bpm-row input[type="range"] {
  flex: 1;
  accent-color: #a855f7;
  height: 4px;
  cursor: pointer;
}
.bpm-row .bpm-val {
  font-size: 14px;
  font-family: monospace;
  color: #c084fc;
  min-width: 48px;
  text-align: right;
}
.library h3 {
  font-size: 12px;
  font-weight: 700;
  color: #52525b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-left: 8px;
  margin-bottom: 16px;
}
.library .empty {
  text-align: center;
  color: #52525b;
  font-size: 14px;
  padding: 32px 0;
}
.track-item {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.15s;
}
.track-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
}
.play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.play-btn.active {
  background: #fff;
  color: #000;
}
.play-btn.inactive {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.play-btn.inactive:hover {
  background: rgba(255, 255, 255, 0.2);
}
.track-info {
  flex: 1;
  min-width: 0;
}
.track-info .title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-info .meta {
  font-size: 12px;
  color: #52525b;
}
.dl-btn {
  padding: 8px;
  background: none;
  border: none;
  color: #52525b;
  cursor: pointer;
  transition: color 0.15s;
}
.dl-btn:hover {
  color: #fff;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.switch input:checked + .slider {
  background: #00ff00;
}
.switch .slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
}
.switch input:checked + .slider:before {
  transform: translateX(16px);
}
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.pulse-anim {
  animation: pulse 2s ease-in-out infinite;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 4px;
}
@media (max-width: 768px) {
  .content {
    padding: 16px;
  }
}
