:root {
  --bg: #0A0B0A;
  --card: rgba(26, 30, 26, 0.6);
  --card-border: rgba(29, 185, 84, 0.18);
  --accent: #1DB954;
  --accent-2: #00C853;
  --text: #F5F5F5;
  --text-dim: #9BA39B;
}

* { box-sizing: border-box; }

/* Intro-Splash: kurzer Marken-Moment beim ersten Laden der Seite */
.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0A0B0A;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--accent-2);
  box-shadow: 0 0 34px rgba(29, 185, 84, 0.5);
  animation: splashPulse 1.1s ease infinite;
}

@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Wasserzeichen/Monogramm in der Ecke: schlicht und ruhig – ein scharf
   umrandetes Quadrat mit dem Buchstaben, keine Animation, kein Glow. */
.brand-mark {
  position: fixed;
  left: calc(16px + env(safe-area-inset-left));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 2;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.brand-mark span {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: rgba(10, 14, 10, 0.5);
}

.brand-mark span::after {
  content: "T";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--accent-2);
}

/* Kein eigener Cursor mehr – normaler Mauszeiger überall (auch über Links/Buttons). */

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  display: flex;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  background: #060706;
}

/* Sanft pulsierender Rahmen-Glow rund um die ganze Seite – gibt der Website
   eine wiedererkennbare, hochwertige Signatur statt eines harten Randes. */
.frame-glow {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0, 200, 83, 0.14), inset 0 0 140px rgba(0, 0, 0, 0.5);
}

.frame-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px rgba(0, 200, 83, 0.28), inset 0 0 140px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: frameGlowPulse 6s ease-in-out infinite;
  will-change: opacity;
}

@keyframes frameGlowPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.reduce-motion .frame-glow::after {
  animation: none;
  opacity: 0;
}

/* Animierter Aurora-Hintergrund: weiche, langsam wandernde Grün-Blobs auf
   fast schwarzem Grund, statt eines Fotos. Nur Transform-Animationen
   (GPU-günstig), kein Foto/Filter-Blur auf großen Flächen nötig. */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #05060a;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}

.blob-1 {
  width: 62vmax;
  height: 62vmax;
  top: -22%;
  left: -18%;
  background: radial-gradient(circle at 35% 35%, var(--accent-2), transparent 70%);
  animation: auroraFloat1 32s ease-in-out infinite alternate;
}

.blob-2 {
  width: 56vmax;
  height: 56vmax;
  top: 4%;
  right: -22%;
  background: radial-gradient(circle at 60% 40%, #0F6B39, transparent 72%);
  animation: auroraFloat2 38s ease-in-out infinite alternate;
}

.blob-3 {
  width: 50vmax;
  height: 50vmax;
  bottom: -24%;
  left: 12%;
  background: radial-gradient(circle at 50% 50%, rgba(29, 185, 84, 0.55), transparent 72%);
  animation: auroraFloat3 44s ease-in-out infinite alternate;
}

.blob-4 {
  width: 38vmax;
  height: 38vmax;
  bottom: 6%;
  right: 4%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 200, 83, 0.4), transparent 75%);
  animation: auroraFloat2 28s ease-in-out infinite alternate-reverse;
}

@keyframes auroraFloat1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(6%, 8%) scale(1.12); }
}

@keyframes auroraFloat2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-8%, 6%) scale(1.08); }
}

@keyframes auroraFloat3 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(5%, -7%) scale(1.1); }
}

.reduce-motion .aurora-blob {
  animation: none;
}

/* Vignette über den Blobs: dunkler an den Rändern, damit Text/Buttons in
   der Mitte immer gut lesbar bleiben. */
.aurora-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 85% at 50% 32%, transparent 0%, rgba(5, 6, 8, 0.35) 55%, rgba(4, 5, 6, 0.82) 100%);
}

/* Feines Filmkorn über allem, für weniger glatten/generierten Look */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Handy: Blur & Animation der Blobs kosten spürbar Leistung ohne echten
   Mehrwert auf kleinem Screen – Bewegung bleibt aus, Farbe/Verlauf bleiben. */
@media (max-width: 700px) {
  .grain {
    display: none;
  }

  .aurora-blob {
    animation: none;
    filter: blur(42px);
    opacity: 0.5;
  }

  .frame-glow::after {
    display: none;
  }
}

.mosaic-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #10130f;
}

.mosaic-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.55;
}

.mosaic-tile.text-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  text-align: center;
  color: var(--accent-2);
  opacity: 0.4;
  padding: 6px;
  overflow-wrap: anywhere;
}

.reduce-motion .bg,
.reduce-motion .avatar-wrap::before {
  animation-play-state: paused;
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 20%), rgba(29, 185, 84, 0.16), transparent 70%);
}

.spotify-embed {
  width: 100%;
  margin: 4px 0 20px;
  border-radius: 14px;
  overflow: hidden;
}

.spotify-embed iframe {
  display: block;
  border-radius: 14px;
}

.view-badge {
  vertical-align: middle;
  margin-left: 6px;
  opacity: 0.85;
  height: 16px;
}

.tilt {
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(48px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  transition: transform 0.25s ease-out;
  will-change: transform;
}

@media (min-width: 480px) {
  .container {
    padding-top: calc(64px + env(safe-area-inset-top));
  }
}

@media (max-height: 700px) {
  .avatar-wrap {
    width: 92px;
    height: 92px;
    margin-bottom: 10px;
  }

  .name {
    font-size: 1.4rem;
  }

  .links {
    gap: 9px;
  }

  .link-btn {
    padding: 11px 16px;
  }

  .footer {
    margin-top: 20px;
  }
}

.top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-wrap {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  padding: 3px;
  background: var(--accent);
  box-shadow: 0 0 36px rgba(29, 185, 84, 0.4);
  margin-bottom: 16px;
}

.heart-pop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  animation: heartPop 0.7s ease forwards;
}

.heart-pop svg {
  width: 52px;
  height: 52px;
  color: #1DB954;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
}

@keyframes heartPop {
  0% { opacity: 0; transform: scale(0.3); }
  28% { opacity: 1; transform: scale(1.2); }
  48% { transform: scale(0.94); }
  70% { transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1) translateY(-16px); }
}

.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(0, 200, 83, 0.95) 10%, transparent 32%, transparent 100%);
  animation: haloSpin 4.5s linear infinite;
  z-index: -1;
}

@keyframes haloSpin {
  to { transform: rotate(360deg); }
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid #0A0B0A;
}

.name {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 6px;
  background: linear-gradient(100deg, var(--text) 0%, var(--text) 35%, var(--accent-2) 50%, var(--text) 65%, var(--text) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
  text-shadow: 0 2px 18px rgba(0,0,0,0.4);
  animation: nameShine 5s ease-in-out infinite;
}

@keyframes nameShine {
  0% { background-position: 200% 0; }
  100% { background-position: -40% 0; }
}

.reduce-motion .name {
  animation: none;
  background-position: 0 0;
}

.bio {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0 0 20px;
  line-height: 1.45;
  max-width: 340px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.social-row {
  display: flex;
  gap: 22px;
  margin-bottom: 36px;
}

.social-row a {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-row a svg {
  width: 22px;
  height: 22px;
}

.social-row a:hover {
  opacity: 1;
  color: var(--accent-2);
  transform: translateY(-2px) scale(1.14);
}

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: rgba(60, 74, 52, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(29, 185, 84, 0.6);
  transform: scale(0);
  animation: rippleAnim 0.45s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(1); opacity: 0; }
}

.link-btn:hover {
  border-color: var(--accent);
  background: rgba(29, 185, 84, 0.20);
  box-shadow: 0 8px 24px rgba(29, 185, 84, 0.25);
}

.link-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 35%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.link-btn:hover::after {
  left: 130%;
}

.link-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  background: rgba(29, 185, 84, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.link-icon svg {
  width: 18px;
  height: 18px;
}

.link-label {
  flex: 1;
  text-align: left;
}

.chevron {
  color: var(--text-dim);
  font-size: 1.2rem;
  opacity: 0.6;
}

.footer {
  margin-top: 36px;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sig {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-left: 2px;
}

.greeting {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 2px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.clock {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
  margin: 0 0 20px;
}

.confetti-piece {
  position: fixed;
  top: -10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 60;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(540deg); opacity: 0.3; }
}

.link-btn:active {
  transform: scale(0.97);
}

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

.reveal {
  opacity: 0;
  animation: revealUp 0.55s ease forwards;
}

.r1 { animation-delay: 0.05s; }
.r2 { animation-delay: 0.15s; }
.r3 { animation-delay: 0.25s; }
.r4 { animation-delay: 0.32s; }
.r5 { animation-delay: 0.39s; }
.r6 { animation-delay: 0.46s; }
.r7 { animation-delay: 0.53s; }
.r8 { animation-delay: 0.60s; }
.r9 { animation-delay: 0.7s; }
.r10 { animation-delay: 0.78s; }

.link-preview {
  position: absolute;
  left: 50%;
  top: -36px;
  transform: translateX(-50%);
  background: rgba(10, 14, 10, 0.95);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 0.7rem;
  padding: 5px 11px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}

.link-preview.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.share-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.share-btn:hover {
  opacity: 1;
  color: var(--accent-2);
}

.share-btn svg {
  width: 15px;
  height: 15px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.metric-card {
  background: rgba(60, 74, 52, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 8px;
  text-align: center;
}

.metric-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-2);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-label {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.week-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
}

.week-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.week-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.week-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: height 0.3s ease;
}

.week-bar-value {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.week-bar-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.stat-card {
  width: 100%;
  background: rgba(60, 74, 52, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  box-shadow: 0 0 32px rgba(29, 185, 84, 0.12);
}

.stat-number {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--accent-2);
  text-shadow: 0 0 24px rgba(29, 185, 84, 0.5);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.clicks-card {
  margin-top: 14px;
  text-align: left;
}

.clicks-card .stat-label {
  text-align: center;
}

.click-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.click-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(29, 185, 84, 0.10);
  border-radius: 10px;
  font-size: 0.9rem;
}

.click-count {
  font-weight: 700;
  color: var(--accent-2);
}

.refresh-btn {
  margin-top: 18px;
  padding: 10px 22px;
  background: rgba(29, 185, 84, 0.15);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.refresh-btn:hover {
  border-color: var(--accent);
  background: rgba(29, 185, 84, 0.25);
}

.stat-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.stat-actions .refresh-btn {
  margin-top: 0;
}

.reset-btn {
  margin-top: 0;
  padding: 10px 22px;
  background: rgba(226, 75, 74, 0.12);
  border: 1px solid rgba(226, 75, 74, 0.3);
  border-radius: 12px;
  color: #F5A9A8;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.reset-btn:hover {
  border-color: #E24B4A;
  background: rgba(226, 75, 74, 0.22);
}

.reset-hint {
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
}
