:root {
  --bg-dark: #0d0b12;
  --bg-card: #15121a;
  --bg-card-hover: #1a1622;
  --accent: #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.4);
  --accent-muted: #7c3aed;
  --text: #f5f3f7;
  --text-muted: #a78bfa;
  --text-dim: #6b5b7a;
  --border: rgba(168, 85, 247, 0.3);
  --sidebar-width: 110px;
  --sidebar-width-expanded: 260px;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(168, 85, 247, 0.08), transparent);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-dark);
  border-right: 1px solid rgba(168, 85, 247, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 0;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar:hover {
  width: var(--sidebar-width-expanded);
  align-items: stretch;
  padding: 20px 12px;
}

.sidebar:hover .nav-item {
  justify-content: flex-start;
  width: 100%;
  padding: 0 12px;
}

.sidebar:hover .nav-label {
  max-width: 200px;
  opacity: 1;
  margin-left: 12px;
  transition: opacity 0.3s ease 0.1s, margin 0.3s ease 0.1s;
}

.sidebar:hover .logo {
  justify-content: flex-start;
  width: 100%;
  min-width: 88px;
  padding: 0 12px;
  overflow: visible;
}

.sidebar:hover .logo-img {
  width: 88px;
  height: 88px;
  min-width: 88px;
  flex-shrink: 0;
}

.sidebar:hover .logo-text {
  max-width: none;
  overflow: visible;
  opacity: 1;
  margin-left: 10px;
  transition: opacity 0.3s ease 0.1s, margin 0.3s ease 0.1s;
}

.logo {
  width: 88px;
  height: 88px;
  min-width: 88px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
  transition: max-width 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.nav-icons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  justify-content: flex-start;
  padding: 16px 0;
}

.nav-bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(168, 85, 247, 0.08);
}

.nav-item {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-icon-wrap {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.nav-icon-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}

.nav-label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: max-width 0.3s ease, opacity 0.3s ease 0.05s, margin 0.3s ease;
}

.nav-item:hover {
  background: rgba(168, 85, 247, 0.15);
  color: var(--text);
}

.nav-item.active {
  background: rgba(168, 85, 247, 0.2);
  color: var(--text);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}

.nav-item.active .nav-label {
  color: var(--text);
}

/* Main content */
.content {
  flex: 1;
  padding: 48px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.content .view {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

#view-home.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#view-home .welcome {
  margin-bottom: 56px;
  margin-left: -35px;
}

#view-home .welcome h1 {
  margin-bottom: 8px;
  font-size: 3.5rem;
}

#view-home .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

#view-home .cards {
  margin-bottom: 48px;
  width: 100%;
}

#view-home .featured {
  width: 100%;
}

.view.active {
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

#view-vsts.view.active,
#view-daws.view.active,
#view-presets.view.active {
  align-items: stretch;
}

.welcome {
  margin-bottom: 32px;
}

.welcome h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.welcome .highlight {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.welcome .highlight-us {
  color: var(--text);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Search bar */
.search-wrapper {
  width: 100%;
  margin-bottom: 32px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 14px;
  padding: 14px 20px;
  transition: all 0.3s ease;
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.search-bar:focus-within .search-icon {
  color: var(--accent);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

#view-home .cards {
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 16px;
  padding: 32px 24px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  font-family: inherit;
  text-align: left;
  width: 100%;
  min-height: 180px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.4s ease,
    background 0.4s ease;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px) scale(1.03);
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15),
    0 0 0 1px rgba(168, 85, 247, 0.15),
    0 0 16px rgba(168, 85, 247, 0.08);
}

.card:hover::before {
  opacity: 1;
}

.card:active {
  transform: translateY(-4px) scale(1.02);
  transition-duration: 0.15s;
}

.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--accent);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    color 0.4s ease,
    filter 0.4s ease;
}

.card:hover .card-icon {
  transform: scale(1.12) rotate(2deg);
  color: var(--text);
  filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.3));
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Views */
.view {
  display: none;
}

.view.active {
  animation: viewFadeIn 0.35s ease forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--text-muted);
  padding: 0;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  color: var(--text);
  border-color: var(--accent);
}

.back-btn svg {
  width: 16px;
  height: 16px;
}

.cards-placeholder {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-text {
  color: var(--text-dim);
  font-size: 1rem;
}

#view-vsts {
  margin-top: 0;
}

#view-vsts .back-btn {
  margin-bottom: 16px;
}

#view-vsts .welcome {
  margin-bottom: 20px;
}

#view-vsts .search-wrapper {
  margin-bottom: 20px;
}

#view-vsts .cards {
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 0;
}

/* Featured Artist */
.featured {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.featured h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.featured-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 32px 40px;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card:hover {
  box-shadow: 0 0 32px rgba(168, 85, 247, 0.3),
    0 8px 24px rgba(168, 85, 247, 0.15);
  transform: translateY(-4px);
}

.artist-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.artist-avatar svg {
  width: 44px;
  height: 44px;
  color: var(--text);
}

.artist-name {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .content {
    padding: 32px 24px;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  #view-vsts .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .welcome h1 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Plugin Detail View */
.plugin-detail-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.plugin-detail-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
  background: var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 16px;
  padding: 32px;
}

.plugin-detail-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.05);
  padding: 16px;
}

.plugin-detail-info {
  flex: 1;
}

.plugin-detail-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.plugin-detail-author {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 500;
}

.plugin-detail-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 40px;
  padding: 24px 32px;
  background: var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 12px;
  text-align: left;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 20px 40px;
  background: var(--accent);
  color: var(--text);
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.download-btn:hover {
  background: var(--accent-muted);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
}

.download-btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .plugin-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .plugin-detail-title {
    font-size: 2rem;
  }
}
