/* ─── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: dark;

  --white: #ffffff;
  --white-60: rgba(255, 255, 255, 0.60);
  --white-30: rgba(255, 255, 255, 0.30);
  --white-10: rgba(255, 255, 255, 0.10);
  --white-06: rgba(255, 255, 255, 0.06);

  --font: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 20px;
  --card-w: 360px;

  /* Platform accent colours */
  --clr-yt: rgba(255, 0, 0, 0.35);
  --clr-x: rgba(255, 255, 255, 0.15);
  --clr-ig: rgba(225, 48, 108, 0.35);
  --clr-twitch: rgba(145, 71, 255, 0.40);
  --clr-discord: rgba(88, 101, 242, 0.45);
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  width: 100%;
  margin: 0;
  padding: 40px 20px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── Background ───────────────────────────────────────────── */
.bg {
  position: fixed;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background-image: url('backgroun.JPG');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

.bg-overlay {
  position: fixed;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(160deg,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.25) 50%,
      rgba(0, 0, 0, 0.55) 100%);
  z-index: 0;
  pointer-events: none;
}

/* ─── Layout (side-by-side) ────────────────────────────────── */
.layout {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 920px;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Layout fade animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Left Card ────────────────────────────────────────────── */
.card {
  flex: 0 0 auto;
  width: min(var(--card-w), 100%);
  padding: 48px 36px 44px;
  border-radius: var(--radius);

  background: rgba(10, 10, 10, 0.35);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--white-10);

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── Location tag ─────────────────────────────────────────── */
.location-tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-60);
  background: var(--white-06);
  border: 1px solid var(--white-10);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 24px;
}

/* ─── Name & tagline ───────────────────────────────────────── */
.name {
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
  text-align: center;
}

.tagline {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-60);
  text-align: center;
}

/* ─── Divider ──────────────────────────────────────────────── */
.divider {
  width: 40px;
  height: 1px;
  background: var(--white-30);
  margin: 28px auto;
}

/* ─── Social Buttons — vertical list ──────────────────────── */
.socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--white);
  background: var(--white-06);
  border: 1px solid var(--white-10);
  transition: background 0.22s ease, transform 0.18s ease,
    border-color 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}

.social-btn:hover {
  background: var(--white-10);
  border-color: var(--white-30);
  transform: translateX(4px);
  box-shadow: 0 0 20px var(--platform-color, rgba(255, 255, 255, 0.1));
}

.social-btn:active {
  transform: translateX(2px) scale(0.98);
}

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  opacity: 0.9;
}

.social-btn-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

/* Platform accent colours */
.social-btn.yt {
  --platform-color: var(--clr-yt);
}

.social-btn.x {
  --platform-color: var(--clr-x);
}

.social-btn.ig {
  --platform-color: var(--clr-ig);
}

/* ─── Right Column ─────────────────────────────────────────── */
.right-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* Make the column itself fill the full card height */
  align-self: stretch;
}

/* Twitch : Discord = 1 : 2 */
.twitch-embed-card {
  flex: 1 1 0;
  min-height: 0;
}

.discord-card {
  flex: 2 1 0;
  min-height: 0;
}

/* Twitch card border & glow */
.twitch-embed-card {
  border: 1px solid rgba(145, 71, 255, 0.30);
  box-shadow: 0 0 28px rgba(145, 71, 255, 0.10);
}

/* ─── Twitch Channel Card (link, no video) ─────────────────── */
.twitch-channel-link {
  position: relative;
  text-decoration: none;
  color: var(--white);
  justify-content: space-between;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.twitch-channel-link:hover {
  transform: translateY(-3px);
  border-color: rgba(145, 71, 255, 0.65);
  box-shadow: 0 10px 40px rgba(145, 71, 255, 0.28);
}

.twitch-channel-link:active {
  transform: translateY(-1px) scale(0.99);
}

/* Animated radial glow background */
.twitch-card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(145, 71, 255, 0.30) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(100, 40, 200, 0.18) 0%, transparent 55%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.twitch-channel-link:hover .twitch-card-glow {
  opacity: 1;
}

/* Channel identity section */
.twitch-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  padding: 0 20px;
  justify-content: space-between;
}

.twitch-card-avatar {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(145, 71, 255, 0.18);
  border: 2px solid rgba(145, 71, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(145, 71, 255, 0.35);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.twitch-channel-link:hover .twitch-card-avatar {
  border-color: rgba(145, 71, 255, 0.80);
  box-shadow: 0 0 28px rgba(145, 71, 255, 0.55);
}

.twitch-card-avatar svg {
  width: 28px;
  height: 28px;
  color: #9147FF;
  filter: drop-shadow(0 0 6px rgba(145, 71, 255, 0.60));
}

.twitch-card-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.twitch-card-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
}

.twitch-card-url {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #d4bcff;
}

/* Right-side CTA */
.twitch-card-cta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #d4bcff;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.twitch-channel-link:hover .twitch-card-cta {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* ─── Shared Live Widget Card ──────────────────────────────── */
.live-widget-card {
  min-height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;

  background: rgba(10, 10, 10, 0.35);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
}

/* Discord card border/glow + clickable */
.discord-card {
  border: 1px solid rgba(88, 101, 242, 0.25);
  box-shadow: 0 0 28px rgba(88, 101, 242, 0.07);
  text-decoration: none;
  color: var(--white);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.discord-card:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 101, 242, 0.60);
  box-shadow: 0 8px 32px rgba(88, 101, 242, 0.25);
  background: rgba(88, 101, 242, 0.08);
}

.discord-card:active {
  transform: translateY(-1px) scale(0.99);
}

/* Invite prompt text inside Discord card */
.discord-invite-text {
  padding: 20px 20px 24px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.discord-card:hover .discord-invite-text {
  color: rgba(255, 255, 255, 0.90);
}

/* ─── Widget Header ────────────────────────────────────────── */
.live-widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 11px;
  flex-shrink: 0;
}

.twitch-header {
  background: rgba(145, 71, 255, 0.10);
  border-bottom: 1px solid rgba(145, 71, 255, 0.20);
}

.discord-header {
  background: rgba(88, 101, 242, 0.10);
  border-bottom: 1px solid rgba(88, 101, 242, 0.20);
}

.live-widget-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.twitch-header .live-widget-icon {
  color: #9147FF;
}

.discord-header .live-widget-icon {
  color: #5865F2;
}

.live-widget-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.70);
  flex: 1;
}

/* Pulsing live dot */
.live-widget-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ba55c;
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(59, 165, 92, 0.8);
}

@keyframes livePulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

/* Widget iframes — fill the card */
.live-widget-card iframe {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  border: none;
}

/* Discord widget wrapper — needed for overlay positioning */
.discord-widget-wrap {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.discord-widget-wrap iframe {
  flex: 1 1 auto;
  width: 100%;
  border: none;
  display: block;
}

/* Transparent overlay that intercepts clicks on the iframe */
.discord-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: pointer;
  background: transparent;
}

/* Full-card overlay: covers the entire discord card (header + iframe) */
.discord-full-overlay {
  z-index: 20;
}

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  font-size: 11px;
  color: var(--white-30);
  letter-spacing: 0.06em;
  animation: fadeUp 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── Responsive ───────────────────────────────────────────── */

/* ── Tablet & Small Laptops: keep 2-columns but adjust spacing ── */
@media (max-width: 1100px) and (min-width: 641px) {
  .layout {
    max-width: 95%;
    gap: 16px;
  }

  .card {
    flex: 0 0 clamp(320px, 40%, 360px);
    padding: 36px 24px;
  }
}

/* ── Mobile: switch to 1-column only for phones (less than 640px) ── */
@media (max-width: 640px) {
  .layout {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
  }

  .card {
    width: 100%;
    max-width: 500px;
    padding: 40px 24px 36px;
  }

  /* Social buttons: row of perfect square icons on mobile */
  .socials {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }

  .social-btn {
    flex: 1;
    max-width: 80px;
    height: 56px;
    padding: 0;
    justify-content: center;
    align-items: center;
  }

  .icon {
    width: 22px;
    height: 22px;
  }

  .social-btn-name {
    display: none !important;
  }

  .right-col {
    width: 100%;
    max-width: 500px;
    flex: none;
    gap: 16px;
  }

  .live-widget-card {
    min-height: 180px;
  }
}

/* ── Mobile: single-column, tighter spacing ── */
@media (max-width: 480px) {
  :root {
    --radius: 16px;
  }

  body {
    padding: 20px 12px 36px;
  }

  .card {
    padding: 28px 20px 26px;
  }

  .name {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .location-tag {
    font-size: 11px;
    padding: 4px 12px;
    margin-bottom: 18px;
  }

  .divider {
    margin: 20px auto;
  }
}

/* ── Extra-small phones (≤360px) ── */
@media (max-width: 360px) {
  body {
    padding: 14px 10px 28px;
  }

  .card {
    padding: 22px 16px 20px;
  }

  .name {
    font-size: 1.9rem;
  }

  .social-btn {
    padding: 11px 14px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .layout,
  .footer,
  .live-widget-dot {
    animation: none;
  }

  .social-btn,
  .twitch-channel-link {
    transition: none;
  }
}