@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&display=swap');

:root {
  --accent: rgb(157, 78, 221);         
  --accent-2: #ff007f;                 
  --accent-soft: rgba(157, 78, 221, .35);
  --accent-2-soft: rgba(255, 0, 127, .28);

  --bg-0: #0a0512;                     
  --bg-1: rgba(15, 10, 25, .85);       
  --bg-2: rgba(15, 10, 25, .60);

  --text: #ffffff;
  --muted: rgba(255, 255, 255, .72);
  --muted-2: rgba(255, 255, 255, .55);

  --radius: 18px;
  --shadow: 0 18px 55px rgba(0, 0, 0, .80);
  --stroke: rgba(255, 255, 255, .08);
  --stroke-2: rgba(255, 255, 255, .14);
  --stroke-accent: rgba(157, 78, 221, .42);
  --stroke-accent-strong: rgba(255, 0, 127, .55);

  --green: rgba(0, 255, 0, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 10% 20%, rgba(157, 78, 221, 0.22), transparent 65%),
    radial-gradient(1000px 800px at 90% 10%, rgba(255, 0, 127, 0.18), transparent 60%),
    radial-gradient(1100px 800px at 50% 80%, rgba(114, 9, 183, 0.18), transparent 60%),
    linear-gradient(180deg, #07030d 0%, #0a0512 50%, #040207 100%);
  overflow-y: auto;
}

.bg-blur {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 7, 0.72); 
  backdrop-filter: blur(12px);
  z-index: -2;
}

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

.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  will-change: transform;
}

.aurora span:nth-child(1) {
  width: 620px;
  height: 620px;
  left: -120px;
  top: -100px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation: auroraDrift1 22s ease-in-out infinite;
}

.aurora span:nth-child(2) {
  width: 560px;
  height: 560px;
  right: -140px;
  top: 10%;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  animation: auroraDrift2 26s ease-in-out infinite;
}

.aurora span:nth-child(3) {
  width: 700px;
  height: 700px;
  left: 25%;
  bottom: -260px;
  background: radial-gradient(circle, rgba(114, 9, 183, .9) 0%, transparent 70%);
  animation: auroraDrift3 30s ease-in-out infinite;
}

@keyframes auroraDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.15); }
}

@keyframes auroraDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, 50px) scale(1.1); }
}

@keyframes auroraDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -60px) scale(1.08); }
}

#particles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .aurora span { animation: none; }
}

.interactive-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle 600px at var(--x, 50vw) var(--y, 50vh), rgba(157, 78, 221, 0.12), transparent 80%);
  z-index: -1;
  pointer-events: none;
  transition: background 0.15s ease-out;
}

body::before {
  content: "";
  position: fixed;
  inset: -120px;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 20% 40%, rgba(255, 0, 127, 0.09), transparent 70%),
    radial-gradient(850px 550px at 80% 70%, rgba(157, 78, 221, 0.09), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

.page {
  min-height: 100%;
  padding: 40px 20px 60px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.shell {
  width: min(1100px, 100%);
  display: grid;
  gap: 24px;
}

.header {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--stroke-accent);
  box-shadow: var(--shadow);
  position: relative;
  animation: fadeInDown .7s ease both;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.header::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  pointer-events: none;
  border: 2px solid rgba(0,0,0,0);
  animation: glowPulse 3s ease-in-out infinite;
  opacity: .55;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: url('grafiki/avatar2.png') center/cover no-repeat;
  border: 2px solid rgba(157, 78, 221, .55);
  box-shadow: 0 0 0 6px rgba(255, 0, 127, .10);
  flex: 0 0 auto;
  animation: avatarFloat 4s ease-in-out infinite;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 6px rgba(255, 0, 127, .10); }
  50% { transform: translateY(-6px); box-shadow: 0 0 0 9px rgba(157, 78, 221, .14); }
}

@media (prefers-reduced-motion: reduce) {
  .avatar { animation: none; }
}

.headtext {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.kontakt {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .2px;
}

.username {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
  background: linear-gradient(90deg, #ffffff, var(--accent), var(--accent-2), #ffffff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .username { animation: none; }
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.twitch-wrapper {
  position: relative;
  display: inline-block;
}

.live-indicator {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  z-index: 10;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.live-indicator::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0;
  border-style: solid;
  display: block;
  width: 0;
}

.is-offline {
  background: rgba(30, 5, 5, 0.95);
  border: 1px solid #ff3b30;
  color: #ff3b30;
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.4);
}

.is-offline::after {
  border-color: #ff3b30 transparent transparent transparent;
}

.is-offline .live-dot {
  background-color: #ff3b30;
  opacity: 0.5;
}

.is-live {
  background: rgba(5, 30, 5, 0.95);
  border: 1px solid #34c759;
  color: #34c759;
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.4);
}

.is-live::after {
  border-color: #34c759 transparent transparent transparent;
}

.is-live .live-dot {
  background-color: #34c759;
  animation: livePulse 1.5s infinite;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

@keyframes livePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 199, 89, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.twitch-popup {
    position: fixed;
    width: 420px;
    height: 236px;
    background: #000;
    border: 2px solid #34c759;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,.7);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 9999;
}

.twitch-popup iframe,
#twitch-embed {
    width: 100%;
    height: 100%;
}

.twitch-wrapper.live-active:hover .twitch-popup {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.twitch-popup iframe {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.icon-btn {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(157, 78, 221, .38);
  background: rgba(0, 0, 0, .25);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  position: relative;
  overflow: hidden;
}

.icon-btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  pointer-events: none;
  border: 2px solid rgba(0,0,0,0);
  animation: glowPulse 2.4s ease-in-out infinite;
  opacity: .35;
}

.icon-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 0, 127, .65);
  background: rgba(0, 0, 0, .40);
}

.icon-btn img {
  width: 26px;
  height: 26px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 6px 0;
}

.section-title h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}

.cards {
  display: grid;
  gap: 18px;
}

.card {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 10, 25, .65), rgba(10, 5, 18, .40));
  border: 1px solid rgba(157, 78, 221, .35);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: fadeInUp .6s ease both;
  cursor: pointer;
}

.card:nth-child(1) { animation-delay: .05s; }
.card:nth-child(2) { animation-delay: .15s; }
.card:nth-child(3) { animation-delay: .25s; }
.card:nth-child(4) { animation-delay: .35s; }
.card:nth-child(5) { animation-delay: .45s; }
.card:nth-child(6) { animation-delay: .55s; }

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

.card:hover {
  transform: translateY(-5px) scale(1.008);
  border-color: rgba(255, 0, 127, .65);
  box-shadow: 0 14px 34px rgba(157, 78, 221, 0.25);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.10), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
  pointer-events: none;
  z-index: 1;
}

.card:hover::before {
  left: 130%;
}

@media (prefers-reduced-motion: reduce) {
  .card, .header { animation: none; }
}

.card .glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  pointer-events: none;
  border: 2px solid rgba(0,0,0,0);
  animation: glowPulse 3s ease-in-out infinite;
  opacity: .55;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow:
      0 0 10px 1px rgba(157, 78, 221, 0.2),
      0 0 20px rgba(255, 0, 127, 0.1);
    border-color: rgba(157, 78, 221, 0.3);
  }
  50% {
    box-shadow:
      0 0 20px 2px rgba(157, 78, 221, 0.5),
      0 0 40px 5px rgba(255, 0, 127, 0.3);
    border-color: rgba(255, 0, 127, 0.6);
  }
}

.card-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
}

.brand {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(157, 78, 221, .32);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 300px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .2px;
}

.badge-18 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(255, 0, 0, .16);
  border: 1px solid rgba(255, 0, 0, .35);
  color: rgba(255, 255, 255, .95);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .08);
}

.action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}

.cta {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(157, 78, 221, .95), rgba(255, 0, 127, .80));
  box-shadow: 0 12px 30px rgba(255, 0, 127, .22);
  border: 1px solid rgba(157, 78, 221, .30);
  transition: transform .18s ease, filter .18s ease;
  white-space: nowrap;
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.kod {
  color: var(--muted-2);
  font-size: 12px;
  text-align: right;
  max-width: 220px;
}

.footer {
  margin-top: 15px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .70);
  font-size: 13px;
  line-height: 1.5;
}

.footer a {
  color: rgba(255, 0, 127, .95);
  text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

.bahu-logo {
  width: 120px;
  height: 40px;
  margin: 10px auto 0;
  opacity: .5;
  background: url('grafiki/bahuu.png') center/contain no-repeat;
  display: block;
}

@media (min-width: 2000px) {
  .shell {
    width: min(1300px, 100%);
    gap: 32px;
  }
  .username { font-size: 34px; }
  .card h3 { font-size: 24px; }
  .cta { font-size: 16px; padding: 14px 26px; }
  .meta span { font-size: 14px; }
}

@media (max-width: 900px) {
  .card-inner {
    flex-direction: row;
    align-items: center;
  }
  .action {
    width: auto;
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .page { padding: 16px 12px 30px; }
  .header { padding: 16px; flex-direction: column; text-align: center; gap: 14px; }
  .avatar { width: 80px; height: 80px; }
  .username { font-size: 24px; }

  .user-row {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .socials {
    justify-content: center;
    width: 100%;
  }

  .card-inner { 
    flex-direction: column;
    align-items: stretch; 
    gap: 16px;
    padding: 16px;
  }

  .brand { 
    width: 60px; 
    height: 60px; 
    margin: 0 auto;
  }
  
  .title-row {
    justify-content: center;
  }
  
  .meta {
    justify-content: center;
  }

  .main {
    flex: none;
    text-align: center;
  }

  .action {
    width: 100%;
    margin-left: 0;
    align-items: stretch;
  }

  .kod {
    text-align: center;
    max-width: none;
  }

  .cta {
    width: 100%;
    text-align: center;
  }
}