﻿@import url('https://fonts.googleapis.com/css2?family=Nosifer&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: radial-gradient(circle at top, #18181c 0%, #050505 45%, #000 100%);
  overflow: hidden;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.dashboard-login,
.dashboard-page {
  padding: 40px 20px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(320px, 100%);
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.4);
}

.login-form label {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.login-form input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.login-form button {
  border: none;
  background: linear-gradient(135deg, #f43f5e, #d946ef);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.login-error {
  margin: 0;
  color: #fda4af;
  font-size: 0.9rem;
}

.dashboard-box {
  width: min(700px, 100%);
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 28px;
  display: grid;
  gap: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-header span {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #a78bfa;
  font-size: 0.8rem;
}

.dashboard-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.dashboard-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.dashboard-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-link i {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-note {
  color: #94a3b8;
  font-size: 0.95rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.form-group label {
  color: #cbd5e1;
  font-size: 0.92rem;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.dashboard-subtitle {
  text-transform: uppercase;
  color: #a78bfa;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}

.link-fields {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr auto;
  gap: 10px;
  align-items: center;
}

.link-row input {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.link-row .remove-link {
  border: none;
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
}

.link-icon-image,
.dashboard-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: inline-block;
}

.add-link {
  width: fit-content;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.save-button {
  border: none;
  background: linear-gradient(135deg, #f43f5e, #d946ef);
  color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 520px) {
  .dashboard-box {
    padding: 20px;
  }
  .dashboard-box {
    padding: 20px;
  }
}

.background-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.light-spot {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(68px);
  opacity: 0.45;
  mix-blend-mode: screen;
}

.spot1 {
  top: 8%;
  left: 10%;
  background: rgba(255, 76, 120, 0.24);
  animation: pulse 8s ease-in-out infinite;
}

.spot2 {
  bottom: 10%;
  right: 12%;
  background: rgba(112, 45, 45, 0.18);
  animation: pulse 7.5s ease-in-out infinite alternate;
}

.particles {
  position: absolute;
  inset: 0;
}

.particles span {
  position: absolute;
  display: block;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  filter: blur(1px);
  animation: float 10s linear infinite;
}

.particles span:nth-child(1) { top: 14%; left: 12%; animation-delay: 0s; animation-duration: 9s; }
.particles span:nth-child(2) { top: 32%; left: 76%; animation-delay: 1.2s; animation-duration: 7s; }
.particles span:nth-child(3) { top: 68%; left: 22%; animation-delay: 2s; animation-duration: 10s; }
.particles span:nth-child(4) { top: 50%; left: 45%; animation-delay: 4s; animation-duration: 11s; }
.particles span:nth-child(5) { top: 77%; left: 64%; animation-delay: 3.5s; animation-duration: 8s; }
.particles span:nth-child(6) { top: 28%; left: 55%; animation-delay: 5s; animation-duration: 12s; }
.particles span:nth-child(7) { top: 72%; left: 8%; animation-delay: 6s; animation-duration: 9.5s; }
.particles span:nth-child(8) { top: 18%; left: 84%; animation-delay: 7s; animation-duration: 10.5s; }
.particles span:nth-child(9) { top: 40%; left: 18%; animation-delay: 1s; animation-duration: 13s; }
.particles span:nth-child(10){ top: 60%; left: 88%; animation-delay: 2.5s; animation-duration: 9.8s; }

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50% { opacity: 0.55; transform: scale(1.1); }
}

@keyframes float {
  0% { transform: translateY(0) translateX(0); opacity: 0.15; }
  50% { transform: translateY(-24px) translateX(12px); opacity: 0.35; }
  100% { transform: translateY(4px) translateX(-10px); opacity: 0.15; }
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 5rem);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-family: 'Nosifer', cursive;
  color: transparent;
  background: linear-gradient(180deg, #ff5c75 0%, #c71e35 45%, #3f0509 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 0 24px rgba(255, 120, 138, 0.18),
    0 18px 30px rgba(0, 0, 0, 0.35);
  position: relative;
}

h1 span {
  position: relative;
}

h1 span::after {
  content: '';
  position: absolute;
  left: 22%;
  bottom: -16px;
  width: 10px;
  height: 18px;
  background: radial-gradient(circle at top, rgba(255, 79, 94, 1), transparent 60%);
  border-radius: 50% 50% 50% 50%;
  transform: rotate(-6deg);
  opacity: 0.85;
}

.links {
  display: flex;
  gap: 16px;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  color: #fff;
  text-decoration: none;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}

.links a:hover {
  background: #222;
  transform: translateY(-1px);
}

.links i {
  font-size: 1.3rem;
}

.music-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, calc(100vw - 40px));
  padding: 6px 0;
  background: transparent;
  border: none;
}

.music-row.hidden {
  display: none;
}

.music-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
  border: none;
  overflow: hidden;
}

.music-icon.has-art {
  background-size: cover;
  background-position: center;
}

.music-icon i {
  color: #fff;
  font-size: 1rem;
}

.music-icon.has-art i {
  display: none;
}

.music-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.music-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.music-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #7a0817 0%,#5e161f 50%, #7a081700 100%);
  transition: width 0.2s ease;
}

.music-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.music-title {
  font-size: 0.9rem;
  color: #9ca3af;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-time {
  font-size: 0.88rem;
  color: #9ca3af;
  white-space: nowrap;
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(2.4rem, 14vw, 3.8rem);
  }

  .links {
    gap: 12px;
  }

  .music-row {
    width: 100%;
  }
}
