:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #f59e0b;
  --accent: #10b981;
  --background: #0f172a;
  --background-light: #1e293b;
  --surface: rgba(30, 41, 59, 0.8);
  --surface-light: rgba(51, 65, 85, 0.6);
  --surface-hover: rgba(71, 85, 105, 0.7);
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.15);
  --border-light: rgba(255, 255, 255, 0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 16px;
  --radius-small: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1rem 1.5rem;
  }

  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.95rem;
  }

  .hero {
    padding: 2.5rem 1rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .search-container {
    margin: 1rem 0.5rem;
    padding: 1.5rem;
  }

  .search-box {
    max-width: 100%;
  }

  .search-input {
    font-size: 1rem;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  }

  .search-icon {
    left: 0.75rem;
    font-size: 1rem;
  }

  .results {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .result {
    padding: 1rem;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .result-title {
    font-size: 1.1rem;
  }

  .result-artist {
    font-size: 0.9rem;
  }

  .lyric-types {
    gap: 0.25rem;
  }

  .preview {
    font-size: 0.85rem;
  }

  .section {
    margin: 1rem 0.5rem;
    padding: 1.25rem;
  }

  .section h2 {
    font-size: 1.25rem;
  }

  pre {
    font-size: 0.8rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.95rem;
    padding: 0.75rem;
  }

  .submit-btn {
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
  }

  footer {
    margin: 1.5rem 0.5rem;
    padding: 1.5rem;
    font-size: 0.9rem;
  }

  .beatify-link {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hero h2 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .search-container {
    padding: 1rem;
  }

  .result-title {
    font-size: 1rem;
  }

  .result-artist {
    font-size: 0.85rem;
  }

  footer {
    font-size: 0.85rem;
  }
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--background) 0%, var(--background-light) 100%);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 70%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1rem;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  position: sticky;
  top: 1rem;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo i {
  color: var(--primary);
  font-size: 1.5rem;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

nav a:hover {
  color: var(--primary-light);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
  transform: scale(1.05);
}

.hero {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.search-container {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 1rem;
  box-shadow: var(--shadow);
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-light);
  font-size: 1.1rem;
  color: var(--text);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.1rem;
}

.results {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.result {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
}

.result:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.result-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.result-artist {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.lyric-types {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lyric-type {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-small);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lyric-type.plain {
  background: var(--accent);
  color: white;
}

.lyric-type.line-synced {
  background: var(--secondary);
  color: white;
}

.lyric-type.word-synced {
  background: var(--primary);
  color: white;
  position: relative;
}

.lyric-type.locked {
  background: var(--error);
  color: white;
}

.preview {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.section {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 2rem 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.section h2 {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section h2 i {
  font-size: 1.25rem;
}

.toc ul {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.toc ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-small);
  transition: var(--transition);
  display: block;
  border: 1px solid transparent;
}

.toc ul li a:hover {
  background: var(--surface-light);
  border-color: var(--border);
  color: var(--primary-light);
}

.api-endpoint {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  padding: 1rem;
  margin: 0.5rem 0;
  font-family: 'Fira Code', monospace;
  position: relative;
}

.api-endpoint code {
  color: var(--primary-light);
  font-weight: 500;
}

.api-endpoint .description {
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.locked-badge {
  background: var(--error);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-small);
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

pre {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  padding: 1rem;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-light);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.submit-btn {
  background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
  color: white;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: var(--radius-small);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.beatify-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
}

.beatify-section h2 {
  color: white;
}

.beatify-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.875rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-small);
  transition: var(--transition);
  margin-top: 1rem;
}

.beatify-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

footer {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 2rem 1rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow);
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: var(--muted);
}

.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    margin: 1rem 0.5rem;
    padding: 1.5rem;
  }
}

/* Editor styles */
.editor-container {
  max-width: 900px;
  margin: 2rem auto;
  background: var(--background-secondary, #1e293b);
  padding: 2rem;
  border-radius: 8px;
  color: var(--text-primary, #f1f5f9);
}

.editor-container h2 {
  margin-bottom: 1rem;
}

.editor-container input, .editor-container textarea {
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: var(--background-tertiary, #334155);
  border: none;
  color: #f1f5f9;
  border-radius: 5px;
}

.editor-container .line {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.editor-container .line input {
  flex: 1;
  margin-right: 0.5rem;
}

.editor-container button {
  background: #6366f1;
  border: none;
  padding: 0.5rem 1rem;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
}

.editor-container .timing {
  width: 80px;
}
