* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, Arial, sans-serif;
}

body {
  background: linear-gradient(135deg, #0f0f14, #181824, #0d1321);
  color: #fff;
  min-height: 100vh;
  padding: 20px;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.brand h1 {
  font-size: 2rem;
  font-weight: 800;
}

.brand p {
  color: #c7c7d1;
  margin-top: 6px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.editor-panel,
.preview-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h2 {
  margin-bottom: 18px;
}

.label {
  display: block;
  margin: 14px 0 8px;
  color: #d9d9e5;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1rem;
}

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.6;
}

.theme-buttons,
.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

button {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.theme-btn {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.theme-btn.active {
  background: #ffffff;
  color: #111;
}

#spotifyBtn, #miniSpotifyBtn {
  background: #1db954;
  color: white;
}

#playBtn {
  background: #8b5cf6;
  color: white;
}

#pauseBtn {
  background: #ef4444;
  color: white;
}

#downloadBtn {
  background: #f59e0b;
  color: white;
}

#printBtn {
  background: #3b82f6;
  color: white;
}

.tiny {
  margin-top: 14px;
  color: #b8b8c8;
  font-size: 0.9rem;
}

.note-card {
  position: relative;
  min-height: 620px;
  border-radius: 28px;
  overflow: hidden;
  padding: 24px;
  display: flex;
  align-items: stretch;
}

.note-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.18);
}

.note-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.small-brand {
  font-size: 0.9rem;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 16px;
}

#previewTitle {
  font-size: 2rem;
  margin-bottom: 18px;
}

#previewText {
  font-size: 1.1rem;
  line-height: 1.9;
  white-space: pre-wrap;
  flex: 1;
}

.song-box {
  margin-top: 24px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.song-title {
  font-weight: 800;
}

.song-artist {
  opacity: 0.85;
  font-size: 0.95rem;
}

.theme1 {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.12), transparent 30%),
    linear-gradient(135deg, #4a102a, #7a1f4d, #18091b);
}

.theme2 {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 28%),
    linear-gradient(135deg, #08111f, #12233d, #000814);
}

.theme3 {
  background:
    radial-gradient(circle at top center, rgba(255,255,255,0.16), transparent 25%),
    linear-gradient(135deg, #4b2e05, #b7791f, #1c1003);
}

@media (max-width: 980px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .note-card {
    min-height: 520px;
  }
}