:root {
  color-scheme: dark;
  --bg: #08080a;
  --card-bg: rgba(18, 20, 28, 0.88);
  --input-bg: rgba(26, 29, 40, 0.85);
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.15);
  --gold: #ffd700;
}

[hidden] {
  display: none !important;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background-image: url('./covers/bg-zeche.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%) contrast(140%) brightness(0.28);
  z-index: -2;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

/* Gate Section */
.gate {
  width: 100%;
  max-width: 440px;
  margin-top: 2vh;
}

.gate-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gate-cover-wrap {
  width: 180px;
  height: 180px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
  flex-shrink: 0;
  position: relative;
  aspect-ratio: 1/1;
}

.gate-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(120%);
}

.gate-card h1 {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
}

.intro-text {
  color: #e5e7eb;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gate-card .lede {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.gate-card form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="password"]:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

button[type="submit"] {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

button[type="submit"]:hover {
  background: var(--accent-hover);
}

.error {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* HUB / PROJEKTAUSWAHL */
.hub {
  width: 100%;
  max-width: 680px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.hub-header h1 {
  font-size: 2.4rem;
}

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

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.hub-card {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hub-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.hub-card.placeholder {
  opacity: 0.75;
}

.hub-card.placeholder:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}

.hub-card-cover {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1/1;
}

.hub-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(120%);
}

.hub-card-info h2 {
  font-size: 1.5rem;
  margin: 0.3rem 0;
}

.hub-card-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.25);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.muted {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* APP MAIN / PLAYER */
.app {
  width: 100%;
  max-width: 1080px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.album-title-inline {
  text-align: center;
}

.album-title-inline h2 {
  font-size: 1.6rem;
  margin-top: -0.2rem;
}

button.ghost {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

button.ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.player-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 860px) {
  .player-container {
    grid-template-columns: 1fr;
  }
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.player-bg-card {
  position: relative;
  background-image: linear-gradient(rgba(18, 20, 28, 0.82), rgba(18, 20, 28, 0.92)), url('./covers/player-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  /* Player bleibt dauerhaft in Farbe (kein Grayscale mehr) */
  filter: grayscale(0%) contrast(100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  aspect-ratio: auto !important;
  height: auto !important;
}

.now {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.cover {
  width: 220px;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  aspect-ratio: 1/1;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .cover {
    width: 170px;
    height: 170px;
  }
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0%) contrast(100%);
}

.now-meta .now-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 600;
}

.now-meta h2 {
  font-size: 2.2rem;
  margin: 0.1rem 0 0 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.now-meta .artist {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.player {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(8px);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.25rem;
}

.seek-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reaction-markers-track {
  position: relative;
  width: calc(100% - 90px);
  margin: 0 auto;
  height: 24px;
  pointer-events: none;
}

.reaction-marker {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.85rem;
  line-height: 1;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9));
}

.reaction-marker img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--accent);
}

@keyframes popIn {
  0% { transform: translateX(-50%) scale(0); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
}

.controls button {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.1s ease, color 0.2s ease;
}

.controls button:hover {
  transform: scale(1.1);
  color: var(--accent);
}

.controls button.play {
  background: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
}

.controls button.play:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: scale(1.05);
}

.volume {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: absolute;
  right: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.volume input {
  width: 60px;
}

@media screen and (max-width: 768px) {
  .volume {
    display: none !important;
  }
}

.reaction-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0.2rem;
}

.reaction-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reaction-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  opacity: 0.8;
}

.gif-picker-btn {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gif-picker-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

.reaction-buttons-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.35rem;
}

@media (max-width: 500px) {
  .reaction-buttons-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.reaction-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease, border-color 0.2s ease;
}

.reaction-btn:hover {
  transform: scale(1.25);
  background: rgba(139, 92, 246, 0.3);
  border-color: var(--accent);
  z-index: 2;
}

.reaction-btn:active {
  transform: scale(0.9);
}

.giphy-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.giphy-modal-content {
  background: rgba(22, 25, 35, 0.98);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 1.25rem;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.9);
}

.giphy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.giphy-header button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.giphy-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.giphy-results img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.giphy-results img:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.gif-preview-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.gif-preview-box img {
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
}

.remove-gif {
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 0.8rem;
  cursor: pointer;
}

.comment-gif-img {
  display: block;
  max-width: 180px;
  max-height: 140px;
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
}

.mini-player {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(18, 20, 28, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
  z-index: 9999;
  animation: slideUp 0.3s ease;
  max-width: 380px;
  width: calc(100% - 3rem);
}

.mini-player-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.mini-player-left img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--accent);
  flex-shrink: 0;
}

.mini-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mini-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.mini-player-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 140px;
}

.mini-seek-bar {
  width: 100%;
  height: 4px;
}

.mini-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.mini-controls button {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.mini-controls button:hover {
  transform: scale(1.15);
  color: var(--accent);
}

.mini-play-btn {
  background: var(--accent) !important;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.feedback-section {
  background: var(--input-bg);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.feedback-header h3 {
  font-size: 1.2rem;
  color: var(--text);
}

.rating-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.avg-stars {
  color: var(--gold);
  letter-spacing: 2px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.rating-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.star-rating {
  display: inline-flex;
  gap: 4px;
  cursor: pointer;
  font-size: 1.3rem;
  user-select: none;
}

.star-rating span {
  color: #4b5563;
  transition: color 0.15s ease, transform 0.1s ease;
}

.star-rating span.active {
  color: var(--gold);
}

.star-rating span:hover,
.star-rating span:hover ~ span {
  transform: scale(1.15);
}

.comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.comment-list li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
}

.comment-list li.empty {
  color: var(--text-muted);
  text-align: center;
  border: none;
  background: transparent;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.3rem;
}

.comment-header strong {
  color: var(--text);
}

.comment-header time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

.user-stars {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.comment-list p {
  color: #e5e7eb;
  line-height: 1.4;
}

.library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.library-header h3 {
  font-size: 1.2rem;
  color: var(--text);
}

.playlist-wrapper {
  max-height: none !important;
  overflow-y: visible !important;
  padding-right: 0;
}

.playlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.playlist li {
  padding: 0.75rem 0.9rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.playlist li:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.playlist li.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 500;
}

.track-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-cover-wrap {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: 1/1;
}

.mini-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(120%);
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.track-stars {
  color: var(--gold);
  font-weight: 600;
}

.track-count {
  color: var(--text-muted);
}

.track-no-ratings {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
}
