:root {
  color-scheme: dark;
  font-family: "Roboto", sans-serif;
  font-size: 16px;

  --white: #ffffff;
  --black: #000000;
  --yellow: #d19825;
  --blue-dark: #070b12;
  --blue-medium: #111b2e;
  --blue: #1c2d4a;
  --blue-light: #395a95;
  --blue-lighter: #5976b3;

  --bg: var(--blue-dark);
  --profile: var(--blue-medium);
  --card: var(--blue);
  --text: var(--white);
  --muted: #9fb0cc;
  --accent: var(--yellow);

  --card-border-radius: 20px;
  --button-border-radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--bg), #16243a 60%, #0f2944);
  color: var(--text);
}

.page-shell {
  width: min(92vw, 680px);
  padding: 1.25rem;
}

.profile-card {
  background: var(--profile);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--card-border-radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
  text-align: center;
}

.avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
  background: url('./images/save-stargate-profile-image.png') center center no-repeat;
  background-size: cover;
  color: white;
}

h1 {
  margin: 0;
  font-size: 1.8rem;
}

.subtitle {
  margin: 0.4rem 0 1.5rem;
  color: var(--muted);
}

.social-links-wrapper {
  display: flex;
  justify-content: space-evenly;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 0.5rem 2rem;
}

.profile-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.profile-social p {
  width: 100%;
  margin: 0.8rem 0 0 0;
}

.profile-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}

.profile-social a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.profile-social .service-icon {
  width: 24px;
  height: 24px;
}

.petition-link-wrap {
  margin: 1.4rem 0 0;
}

.petition-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}

.petition-link:hover,
.petition-link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.scroll-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #1d1405;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  z-index: 20;
}

.scroll-to-top:hover,
.scroll-to-top:focus-visible {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.scroll-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .scroll-to-top {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (max-width: 480px) {
  .profile-social a {
    width: 36px;
    height: 36px;
  }

  .profile-social .service-icon {
    width: 18px;
    height: 18px;
  }
}

.past-heading {
  margin: 1.5rem 0 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

.watch-party-card {
  margin-top: 1.25rem;
  overflow: hidden;
  border-radius: var(--card-border-radius);
  background: var(--card);
  /*border: 3px solid var(--accent);*/
}

.watch-party-summary {
  display: block;
  list-style: none;
  cursor: pointer;
}

.watch-party-summary::-webkit-details-marker {
  display: none;
}

.watch-party-card--past .party-body {
  display: none;
}

.watch-party-card--past[open] .party-body {
  display: block;
  animation: card-expand 220ms ease-out;
}

.party-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--card-border-radius) var(--card-border-radius) 0 0;
  border: 3px solid var(--accent);
  transition: border-radius 220ms ease;
}

.party-thumbnail-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transform: scale(1.03);
  transform-origin: center;
}

.watch-party-card--past .party-thumbnail {
  border-bottom-left-radius: var(--card-border-radius);
  border-bottom-right-radius: var(--card-border-radius);
}

.watch-party-card--past[open] .party-thumbnail {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.watch-party-card--past[open] .party-thumbnail-img {
  animation: card-zoom 220ms ease-out;
}

.party-body {
  padding: 1rem 1rem 1.1rem;
}

.party-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.party-header .party-meta {
  margin: 0 0 0.25rem;
  color: #c8d4ee;
  font-size: 0.92rem;
}

.party-header p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.button-list {
  display: grid;
  gap: 2.2rem;
  margin-top: 1.6rem;
}

.button-group {
  display: grid;
  gap: 1rem;
}

@keyframes card-expand {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-zoom {
  from {
    transform: scale(1.05);
  }

  to {
    transform: scale(1.03);
  }
}

.live-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.live-platform-grid .link-button {
  width: 100%;
}

.button-group-heading {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  /*background: linear-gradient(90deg, rgba(109, 124, 255, 0.95), rgba(49, 208, 198, 0.95));*/
  background: var(--blue-light);
  color: white;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
  /*box-shadow: 0 10px 24px rgba(109, 124, 255, 0.22);*/
}

.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

.stream-button--featured {
  background: linear-gradient(90deg, #f7cd58 0%, #e3b43a 42%, #d19825 100%);
  color: #1d1405;
  box-shadow: 0 14px 34px rgba(209, 152, 37, 0.34);
}

.stream-button--featured:hover,
.stream-button--featured:focus-visible {
  box-shadow: 0 18px 40px rgba(209, 152, 37, 0.4);
}

.stream-button--live {
  outline: 2px solid rgba(255, 255, 255, 0.22);
  outline-offset: 2px;
}

.stream-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(114, 18, 18, 0.95);
  color: #fff4f4;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stream-live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #ff5c5c;
  box-shadow: 0 0 0 0 rgba(255, 92, 92, 0.65);
  animation: live-pulse 1.5s infinite;
  flex-grow: 0;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 92, 92, 0.65);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(255, 92, 92, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 92, 92, 0);
  }
}

.service-icon {
  width: 3rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.4));
}

@media (max-width: 767px) {
  .profile-card {
    padding: 1.5rem 1rem;
  }

  .link-button {
    gap: 0.9rem;
    padding: 0.85rem 0.9rem;
  }

  .stream-live-badge {
    font-size: 0.68rem;
    padding: 0.22rem 0.5rem;
  }

  .service-icon {
    width: 2rem;
    height: 1.5rem;
  }
}

@media (max-width: 600px) {
  .stream-button .service-icon {
    width: 1.5rem;
  }

  .stream-button.link-button {
    gap: 0.3rem;
  }

  .stream-live-badge {
    font-size: 0.68rem;
    padding: 0.22rem 0.5rem;
  }
}

@media (max-width: 600px) and (min-width: 500px) {
  .live-platform-grid .stream-live-badge {
    width: 3.25rem;
    overflow: hidden;
  }
}

@media (max-width: 500px) {
  .live-platform-grid {
    grid-template-columns: 1fr;
  }
}
