:root {
  --bg: #09090b;
  --card: rgba(17, 24, 39, 0.8);
  --card-strong: rgba(17, 24, 39, 0.95);
  --primary: #7c3aed;
  --secondary: #3b82f6;
  --glow: #a855f7;
  --text: #f8fafc;
  --muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --rain-intensity: 1;
  --particle-intensity: 1;
  --neon-intensity: 1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, rgba(124, 58, 237, 0.16), transparent 30%), var(--bg);
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 1.1s ease;
}

body.loaded {
  opacity: 1;
}

body.midnight-drive {
  --rain-intensity: 1.45;
  --particle-intensity: 1.25;
  --neon-intensity: 1.25;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
  opacity: 0.08;
  mix-blend-mode: screen;
  z-index: 1;
}

.cursor-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22), transparent 65%);
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: blur(12px);
  transition: transform 0.15s ease-out;
}

.progress-bar {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--glow));
  z-index: 20;
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.8);
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(9, 9, 11, 0.98), rgba(17, 24, 39, 0.94));
  z-index: 30;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--glow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.35);
}

.loading-screen p {
  position: absolute;
  bottom: 18%;
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 3rem 1.5rem 6rem;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 8, 13, 0.22), rgba(8, 8, 13, 0.7));
}

.backdrop-layer {
  position: absolute;
  inset: 0;
}

.city {
  background:
    linear-gradient(180deg, rgba(7, 8, 16, 0.15), rgba(7, 8, 16, 0.55)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(transparent 0%, rgba(59, 130, 246, 0.06) 100%);
  background-size: auto, 120px 120px, 100% 100%;
  transform: translate3d(0, 0, 0);
}

.reflections {
  background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.16));
  filter: blur(10px);
  opacity: 0.6;
}

.fog {
  background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.16), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.16), transparent 25%);
  mix-blend-mode: screen;
  animation: drift 18s ease-in-out infinite alternate;
  opacity: 0.8;
}

.rain {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  opacity: 0.18 * var(--rain-intensity);
  transform: perspective(600px) rotateX(4deg);
}

.rain::before,
.rain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%);
  background-size: 2px 22px;
  animation: rainFall 1.25s linear infinite;
  opacity: 0.6;
}

.rain::before {
  left: 12%;
  transform: skewX(-15deg);
  animation-duration: 1.45s;
}

.rain::after {
  left: 72%;
  transform: skewX(-8deg);
  animation-duration: 1.1s;
}

.streaks {
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.06) 15%, transparent 40%);
  mix-blend-mode: screen;
  animation: sweep 12s linear infinite;
  opacity: 0.4;
}

.stars {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.85) 1px, transparent 1px);
  background-size: 180px 180px;
  opacity: 0.22;
}

.car-silhouette {
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: 60vw;
  height: 24vw;
  transform: translateX(-50%) scale(1.02);
  background: radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(4, 4, 8, 0.5), rgba(3, 3, 8, 0.95));
  border-radius: 46% 46% 46% 46% / 40% 40% 60% 60%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 40px rgba(59, 130, 246, 0.15);
  filter: blur(0.3px);
  opacity: 0.92;
}

.car-silhouette::before,
.car-silhouette::after {
  content: "";
  position: absolute;
  inset: 0;
}

.car-silhouette::before {
  left: 20%;
  top: 26%;
  width: 34%;
  height: 28%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 70%);
  transform: skewX(-16deg);
}

.car-silhouette::after {
  left: 58%;
  top: 24%;
  width: 11%;
  height: 22%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: -240px 0 0 rgba(255, 255, 255, 0.08);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 900px);
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.profile-card {
  width: min(100%, 620px);
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.75));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.4), rgba(59, 130, 246, 0.25), transparent 68%);
  filter: blur(24px);
  z-index: -1;
  opacity: calc(0.8 * var(--neon-intensity));
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.12), transparent 35%, rgba(255, 255, 255, 0.06));
  pointer-events: none;
  mix-blend-mode: screen;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.status-pill,
.clock {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.75);
}

.avatar {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.35);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fills the avatar while maintaining aspect ratio */
  display: block;
}

h1 {
  margin: 0 0 0.3rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
}

.handle {
  margin: 0 0 0.9rem;
  color: #cbd5e1;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.typing-block {
  min-height: 1.6rem;
  margin-bottom: 0.8rem;
  color: #e2e8f0;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.typing-cursor {
  animation: blink 0.8s infinite;
}

.bio {
  margin: 0 0 1.5rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.social-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: white;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.social-btn:hover,
.social-btn:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 16px 30px rgba(124, 58, 237, 0.22);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: ripple 0.6s ease-out forwards;
}

.social-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.social-btn:hover::before {
  transform: translateX(100%);
}

.social-btn span {
  display: inline-flex;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.social-btn strong {
  font-size: 0.95rem;
}

.social-btn small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.value {
  margin: 0;
  font-size: 0.95rem;
}

.section {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 5rem 1.5rem 0;
}

.section-heading {
  margin-bottom: 1.4rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--primary);
  font-size: 0.8rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2.3vw, 2.25rem);
}

.section-copy {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

.views-badge {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 9, 11, 0.65);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 0.85rem;
}

.views-badge-label {
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.views-badge strong {
  font-size: 0.96rem;
  font-weight: 700;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.game-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(170deg, rgba(17, 24, 39, 0.92), rgba(9, 9, 11, 0.95));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.game-card:hover {
  transform: translateY(-6px) rotateX(3deg);
  border-color: rgba(168, 85, 247, 0.38);
  box-shadow: 0 26px 70px rgba(124, 58, 237, 0.24);
}

.game-card h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 1.1rem;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.game-art {
  height: 140px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.game-art.minecraft {
  background-image: url("minecraft.jpg");
  background-size: cover;
  background-position: center;
}

.game-art.fortnite {
  background-image: url("fortnite.jpg");
  background-size: cover;
  background-position: center;
}

.game-art.assetto {
  background-image: url("asseto.jpg");
  background-size: cover;
  background-position: center;
}

.game-art.dbd {
  background-image: url("dbd.jpg");
  background-size: cover;
  background-position: center;
}

.music-player {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 16;
  min-width: 260px;
  padding: 0.95rem;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.7rem;
}

.player-controls button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  cursor: pointer;
}

.player-meta strong {
  display: block;
  font-size: 0.96rem;
}

.player-meta small {
  color: var(--muted);
}

.track-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 0.7rem;
}

.track-progress {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: inherit;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%) translateY(16px);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 25;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.particle,
.petal {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.68;
  z-index: 1;
}

.particle {
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.petal {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 182, 193, 0.75));
  filter: blur(0.3px);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes drift {
  from {
    transform: translate3d(-3%, 0, 0) scale(1.02);
  }
  to {
    transform: translate3d(3%, 2%, 0) scale(1.08);
  }
}

@keyframes rainFall {
  0% {
    transform: translateY(-18px) skewX(-14deg);
  }
  100% {
    transform: translateY(110vh) skewX(-14deg);
  }
}

@keyframes sweep {
  0% {
    transform: translateX(-12%);
  }
  100% {
    transform: translateX(12%);
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes ripple {
  from {
    width: 0;
    height: 0;
    opacity: 0.55;
  }
  to {
    width: 260px;
    height: 260px;
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2rem 1rem 5rem;
  }

  .card-top,
  .profile-footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .socials {
    grid-template-columns: 1fr;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .music-player {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    min-width: auto;
  }
}
