/* ==========================================================================
   NerdCG - Main Stylesheet
   Theme: Light Blue, Grey, Deep Black, and Vibrant Yellow Accents
   ========================================================================== */

:root {
  --bg-primary: #090c12;
  --bg-secondary: #0f1420;
  --bg-card: rgba(18, 24, 38, 0.72);
  --bg-card-hover: rgba(26, 35, 54, 0.88);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.45);

  --blue-primary: #38BDF8;
  --blue-glow: rgba(56, 189, 248, 0.35);
  --yellow-primary: #FACC15;
  --yellow-glow: rgba(250, 204, 21, 0.35);
  
  --grey-slate: #1E293B;
  --grey-border: #334155;
  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Ambient Background Lights ---------------- */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
  animation: float 14s ease-in-out infinite alternate;
}

.orb-cyan {
  top: -120px;
  right: -60px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--blue-primary) 0%, rgba(56, 189, 248, 0) 70%);
}

.orb-yellow {
  bottom: 12%;
  left: -80px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, var(--yellow-primary) 0%, rgba(250, 204, 21, 0) 70%);
  opacity: 0.18;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(35px) scale(1.08); }
}

/* ---------------- Layout Container ---------------- */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------------- Profile Header ---------------- */
.profile-header {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease;
}

.profile-header:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

.avatar-container {
  position: relative;
  flex-shrink: 0;
}

.avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-primary), var(--yellow-primary));
  z-index: 1;
  opacity: 0.8;
  filter: blur(4px);
  transition: opacity 0.3s ease;
}

.avatar-img {
  position: relative;
  z-index: 2;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-primary);
  background-color: var(--bg-secondary);
  display: block;
}

/* Live pill under avatar */
.live-pill-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.live-pill-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #64748B;
  transition: background-color 0.3s;
}

.live-pill-badge.is-live {
  border-color: rgba(239, 68, 68, 0.6);
  background-color: rgba(239, 68, 68, 0.18);
  color: #FF5A5A;
}

.live-pill-badge.is-live .status-dot {
  background-color: #EF4444;
  box-shadow: 0 0 10px #EF4444;
  animation: pulse-live 1.8s infinite;
}

@keyframes pulse-live {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

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

.streamer-name {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  background: linear-gradient(135deg, #FFFFFF 50%, var(--blue-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.creator-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--blue-primary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.streamer-tagline {
  color: var(--yellow-primary);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.streamer-bio {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-primary);
  color: #090C12;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px var(--blue-glow);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #7DD3FC;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* ---------------- Stream Section ---------------- */
.stream-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--blue-primary);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.player-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: border-color 0.3s ease;
}

.player-card:hover {
  border-color: var(--border-hover);
}

/* 16:9 Responsive Video Wrapper */
.player-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background-color: #000000;
}

.twitch-embed-target {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.twitch-embed-target iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

.player-hint-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  animation: fadeIn 0.4s ease;
}

.player-hint-bar.hidden {
  display: none;
}

.hint-icon {
  font-size: 16px;
}

.hint-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

.hint-close:hover {
  color: #FFF;
}

.player-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(10, 12, 19, 0.6);
  border-top: 1px solid var(--border-color);
  font-size: 13px;
}

.stream-tag {
  color: var(--text-muted);
  font-weight: 600;
  font-family: monospace;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.control-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--blue-primary);
  color: #FFFFFF;
}

.chat-container {
  height: 480px;
  border-top: 1px solid var(--border-color);
  background: #0e0e10;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.chat-container.collapsed {
  height: 0;
  border-top: none;
}

.chat-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  z-index: 1;
}

.chat-container iframe {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------------- Sponsor Card (Focus Fuel) ---------------- */
.sponsor-section {
  display: flex;
  flex-direction: column;
}

.sponsor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.12) 0%, rgba(18, 24, 38, 0.85) 100%);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: var(--radius-md);
  padding: 22px 28px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(250, 204, 21, 0.15);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  gap: 20px;
}

.sponsor-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--yellow-primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 28px rgba(250, 204, 21, 0.3);
}

.sponsor-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sponsor-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow-primary);
  flex-shrink: 0;
}

.sponsor-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.sponsor-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sponsor-tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sponsor-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--yellow-primary);
}

.sponsor-code {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--yellow-primary);
  color: #090C12;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.sponsor-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.sponsor-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.sponsor-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow-primary);
  color: #090C12;
  font-weight: 800;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sponsor-card:hover .sponsor-cta {
  background: #FFE033;
  transform: translateX(4px);
}

/* ---------------- Links / Linktree Section ---------------- */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title-wrap {
  text-align: center;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 40%);
  pointer-events: none;
}

.link-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--card-brand-color, var(--blue-primary));
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 18px var(--card-glow-color, transparent);
}

.link-card:hover::before {
  opacity: 1;
}

.link-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.link-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.link-card:hover .link-icon-box {
  transform: scale(1.1);
}

.link-icon-box svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.link-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.link-handle {
  font-size: 13px;
  color: var(--text-muted);
}

.link-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.link-card:hover .link-badge {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.link-arrow {
  width: 18px;
  height: 18px;
  stroke: var(--text-dim);
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.link-card:hover .link-arrow {
  stroke: #FFF;
  transform: translateX(4px);
}

/* Featured / Live styling */
.link-card.featured {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(18, 24, 38, 0.8) 100%);
}

/* ---------------- Footer ---------------- */
.site-footer {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  margin-top: 20px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copyright {
  font-size: 14px;
  color: var(--text-muted);
}

.copyright strong {
  color: #FFF;
}

.disclaimer {
  font-size: 11.5px;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------------- Toast Notification ---------------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1E293B;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

/* ---------------- Responsive Breakpoints ---------------- */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 20px 14px 40px;
    gap: 24px;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px;
    gap: 20px;
  }

  .avatar-img {
    width: 100px;
    height: 100px;
  }

  .title-row {
    justify-content: center;
  }

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

  .btn-primary {
    flex-grow: 1;
    justify-content: center;
  }

  .sponsor-card {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
    gap: 16px;
  }

  .sponsor-left {
    flex-direction: column;
  }

  .sponsor-tag-row {
    justify-content: center;
  }

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

  .link-card {
    padding: 14px 16px;
  }

  .link-left {
    gap: 12px;
  }

  .link-icon-box {
    width: 38px;
    height: 38px;
  }

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

  .link-title {
    font-size: 15px;
  }

  .link-handle {
    font-size: 12px;
  }

  .link-badge {
    display: none;
  }

  .chat-container {
    height: 380px;
  }
}

/* ---------------- Squirtle Squad Peeker ---------------- */
.squirtle-peeker-wrap {
  position: fixed;
  bottom: 0px;
  right: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 16px rgba(56, 189, 248, 0.35));
}

.squirtle-img {
  width: 250px;
  height: auto;
  display: block;
  transform-origin: bottom center;
  animation: squirtle-peek 6s ease-in-out infinite alternate;
}

.squirtle-bubble {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--yellow-primary);
  color: var(--yellow-primary);
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 12px rgba(250, 204, 21, 0.35);
}

.squirtle-peeker-wrap:hover,
.squirtle-peeker-wrap.active {
  transform: translateY(-16px);
}

.squirtle-peeker-wrap:hover .squirtle-bubble,
.squirtle-peeker-wrap.active .squirtle-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes squirtle-peek {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@media (max-width: 640px) {
  .squirtle-peeker-wrap {
    right: 10px;
    bottom: 0px;
  }
  .squirtle-img {
    width: 170px;
  }
  .squirtle-bubble {
    font-size: 10px;
    padding: 3px 8px;
  }
  .squirtle-peeker-wrap:hover,
  .squirtle-peeker-wrap.active {
    transform: translateY(-10px);
  }
}
