:root {
      --primary: #6c5ce7;
      --secondary: #a29bfe;
      --dark: #2d3436;
      --light: #f7f7f7;
      --success: #00b894;
      --warning: #fdcb6e;
      --danger: #ff7675;
    }
    
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    
    body {
      background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
      color: var(--light);
      min-height: 100vh;
      padding: 20px;
    }
    
    .container {
      max-width: 1200px;
      margin: 0 auto;
      background: rgba(13, 19, 33, 0.9);
      border-radius: 20px;
      box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
      overflow: hidden;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    header {
      background: rgba(0, 0, 0, 0.4);
      padding: 30px;
      text-align: center;
      border-bottom: 2px solid var(--primary);
      position: relative;
      overflow: hidden;
    }
    
    header::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 Q50,30 100,0 L100,100 Q50,70 0,100 Z" fill="rgba(108, 92, 231, 0.1)"/></svg>');
      background-size: cover;
      opacity: 0.3;
    }
    
    header h1 {
      font-size: 3.5rem;
      margin-bottom: 10px;
      background: linear-gradient(to right, #a29bfe, #6c5ce7);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
      position: relative;
      z-index: 1;
    }
    
    header p {
      font-size: 1.2rem;
      color: var(--secondary);
      max-width: 700px;
      margin: 0 auto;
      position: relative;
      z-index: 1;
    }
    
    .content {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      padding: 30px;
    }
    
    @media (max-width: 900px) {
      .content {
        grid-template-columns: 1fr;
      }
    }
    
    .panel {
      background: rgba(30, 30, 50, 0.7);
      border-radius: 15px;
      padding: 25px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .panel-title {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 2px solid var(--primary);
    }
    
    .panel-title i {
      color: var(--secondary);
      font-size: 1.5rem;
    }
    
    .panel-title h2 {
      font-size: 1.8rem;
      color: var(--light);
    }
    
    .form-group {
      margin-bottom: 20px;
    }
    
    .form-group label {
      display: block;
      margin-bottom: 8px;
      font-weight: 600;
      color: var(--secondary);
    }
    
    input, select, textarea, button {
      width: 100%;
      padding: 14px;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(20, 25, 45, 0.8);
      color: var(--light);
      font-size: 1rem;
      transition: all 0.3s ease;
    }
    
    input:focus, select:focus, textarea:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3);
    }
    
    textarea {
      min-height: 150px;
      resize: vertical;
    }
    
    .input-with-button {
      display: flex;
      gap: 10px;
    }
    
    .input-with-button input {
      flex: 1;
    }
    
    .input-with-button button {
      width: auto;
      padding: 0 25px;
      background: var(--primary);
      color: white;
      font-weight: 600;
      cursor: pointer;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    
    .input-with-button button:hover {
      background: #5d4fe0;
      transform: translateY(-2px);
    }
    
    .checkbox-group {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 20px 0;
    }
    
    .checkbox-group input {
      width: auto;
    }
    
    .submit-button {
      background: linear-gradient(135deg, var(--primary), #8c7ae6);
      color: white;
      font-weight: 600;
      font-size: 1.1rem;
      padding: 16px;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.3s ease;
      margin-top: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }
    
    .submit-button:hover {
      transform: translateY(-3px);
      box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
    }
    
    .submit-button:active {
      transform: translateY(0);
    }
    
    .tag-selector {
      display: flex;
      gap: 10px;
      margin-bottom: 15px;
    }
    
    .tag-selector select {
      flex: 1;
    }
    
    #tags {
      margin-top: 10px;
    }
    
    .loading {
      display: none;
      text-align: center;
      padding: 30px;
    }
    
    .spinner {
      border: 5px solid rgba(255, 255, 255, 0.1);
      border-top: 5px solid var(--primary);
      border-radius: 50%;
      width: 50px;
      height: 50px;
      animation: spin 1s linear infinite;
      margin: 0 auto 20px;
    }
    
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    
    #result {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 20px;
      margin-top: 30px;
    }
    
    .track {
      background: rgba(40, 40, 60, 0.8);
      border-radius: 15px;
      overflow: hidden;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
      transition: transform 0.3s ease;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .track:hover {
      transform: translateY(-5px);
    }
    
    .track-header {
      padding: 20px;
      background: rgba(108, 92, 231, 0.2);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .track-title {
      font-size: 1.3rem;
      font-weight: 600;
      margin-bottom: 5px;
      color: var(--light);
    }
    
    .track-meta {
      font-size: 0.9rem;
      color: var(--secondary);
    }
    
    .track-meta div {
      margin-bottom: 5px;
    }
    
    .track-body {
      padding: 20px;
    }
    
    .action-buttons {
      display: flex;
      gap: 10px;
      margin-bottom: 15px;
    }
    
    .action-buttons button {
      flex: 1;
      padding: 12px;
      border-radius: 8px;
      border: none;
      background: rgba(20, 25, 45, 0.8);
      color: var(--light);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    
    .action-buttons button:hover {
      background: var(--primary);
    }
    
    .now-playing {
      color: var(--success);
      font-weight: 600;
      margin-top: 10px;
      display: none;
    }
    
    audio {
      width: 100%;
      margin-top: 15px;
    }
    
    #apiResponse {
      margin-top: 30px;
      padding: 20px;
      background: rgba(0, 0, 0, 0.4);
      border-radius: 10px;
      font-family: monospace;
      white-space: pre-wrap;
      max-height: 200px;
      overflow-y: auto;
      font-size: 0.9rem;
    }
    
    .loading-dots {
      display: inline-block;
      margin-left: 10px;
      color: var(--secondary);
    }
    
    .loading-dots::after {
      content: '...';
      animation: dots 1.5s infinite;
    }
    
    @keyframes dots {
      0%, 20% { content: '.'; }
      40% { content: '..'; }
      60%, 100% { content: '...'; }
    }
    
    .notification {
      position: fixed;
      top: 20px;
      right: 20px;
      padding: 15px 25px;
      border-radius: 10px;
      font-weight: 600;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
      z-index: 1000;
      transform: translateX(200%);
      transition: transform 0.3s ease;
    }
    
    .notification.show {
      transform: translateX(0);
    }
    
    .notification.success {
      background: var(--success);
      color: white;
    }
    
    .notification.error {
      background: var(--danger);
      color: white;
    }
    
    .visualizer {
      height: 100px;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 10px;
      margin: 20px 0;
      display: flex;
      align-items: flex-end;
      justify-content: space-around;
      padding: 10px;
      gap: 2px;
    }
    
    .bar {
      width: 8px;
      background: var(--primary);
      border-radius: 4px 4px 0 0;
      animation: pulse 1.5s infinite alternate;
    }
    
    @keyframes pulse {
      from { height: 10%; }
      to { height: 90%; }
    }
    
    .bar:nth-child(2n) {
      background: var(--secondary);
      animation-delay: 0.2s;
    }
    
    .bar:nth-child(3n) {
      background: #a29bfe;
      animation-delay: 0.4s;
    }
    
    footer {
      text-align: center;
      padding: 25px;
      color: var(--secondary);
      font-size: 0.9rem;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      margin-top: 30px;
    }
    
    .status-indicator {
      display: inline-block;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      margin-right: 8px;
    }
    
    .status-online {
      background: var(--success);
      box-shadow: 0 0 8px var(--success);
    }
    
    .status-offline {
      background: var(--danger);
    }
    
    .streaming-indicator {
      display: inline-block;
      margin-left: 10px;
    }
    
    .streaming-indicator span {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--success);
      margin-right: 4px;
      animation: bounce 1.4s infinite ease-in-out both;
    }
    
    .streaming-indicator span:nth-child(1) { animation-delay: -0.32s; }
    .streaming-indicator span:nth-child(2) { animation-delay: -0.16s; }
    
    @keyframes bounce {
      0%, 80%, 100% { transform: scale(0); }
      40% { transform: scale(1.0); }
    }
    
    #prompt-output {
      background: rgba(10, 15, 30, 0.8);
      border: 1px solid rgba(108, 92, 231, 0.3);
      color: #e0e0ff;
      font-size: 1.1rem;
      line-height: 1.6;
      padding: 15px;
      min-height: 200px;
    }
    
    .typing-cursor {
      display: inline-block;
      width: 8px;
      height: 1.2rem;
      background: var(--secondary);
      margin-left: 2px;
      animation: blink 1s infinite;
    }
    
    @keyframes blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0; }
    }

.clickable-track {
  cursor: pointer;
  color: #007bff;
}
.clickable-track:hover {
  text-decoration: underline;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary), #8c7ae6);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  margin: 6px 12px;
  box-shadow: 0 3px 8px rgba(108, 92, 231, 0.3);
}

.toolbar .logo {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar nav {
  display: flex;
  gap: 6px;
}

.toolbar nav a {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.toolbar nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.2);
}

.toolbar nav a:active {
  transform: translateY(0);
}

/* RESPONSIVE: stacken op small devices */
@media (max-width: 600px) {
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .main-nav a {
    width: 100%;
    padding: 5px 0;
  }

  .logo {
    margin-bottom: 10px;
  }
}


button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}