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

:root {
  --bg-1: #f4f8fd;
  --bg-2: #eaf2fa;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-solid: #ffffff;
  --line: rgba(18, 66, 116, 0.14);
  --text: #0f2239;
  --muted: #5b6f86;
  --brand: #1569c5;
  --brand-2: #0b4488;
  --accent: #ff9a3d;
  --success: #287a39;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 26px 54px rgba(10, 43, 86, 0.14);
}

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

html, body {
  min-height: 100%;
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: url('Sixers Website Designs.png') center center / cover no-repeat fixed;
  padding-bottom: 24px;
}

header,
nav,
.container,
footer {
  width: calc(100% - 10px);
  max-width: none;
  padding-left: clamp(14px, 3.2vw, 38px);
  padding-right: clamp(14px, 3.2vw, 38px);
  margin-left: auto;
  margin-right: auto;
}

header {
  margin-top: 22px;
  padding: 20px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(125deg, rgba(15, 79, 151, 0.96), rgba(17, 113, 197, 0.92));
  color: #eaf4ff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

header::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 64%);
  right: -70px;
  top: -90px;
  animation: drift-glow 8s ease-in-out infinite;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.dolphin-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #39a3ff, #0b4ca0);
  box-shadow: 0 10px 20px rgba(2, 25, 57, 0.32);
}

header h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
}

.subtitle {
  margin-top: 8px;
  text-align: center;
  color: #d1e6ff;
  font-size: 0.96rem;
  position: relative;
  z-index: 1;
}

nav {
  margin-bottom: 22px;
  padding: 10px 14px 14px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 16px 40px rgba(9, 42, 82, 0.1);
  backdrop-filter: blur(10px);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

nav a {
  text-decoration: none;
  color: #1d3f66;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 12px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 220ms ease, background-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

nav a:hover,
nav a.active {
  color: #052f62;
  background: linear-gradient(135deg, rgba(20, 101, 191, 0.16), rgba(255, 255, 255, 0.92));
  box-shadow: 0 10px 24px rgba(7, 44, 89, 0.1);
  transform: translateY(-3px);
}

.container {
  margin-bottom: 22px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.section {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
}

.section-title,
.subsection-title {
  font-family: 'Sora', sans-serif;
  color: var(--brand-2);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}

.section-title {
  font-size: clamp(1.2rem, 2.2vw, 2rem);
}

.subsection-title {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  margin-bottom: 12px;
}

.section-subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.content-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, rgba(16, 82, 149, 0.15), rgba(16, 82, 149, 0));
  margin: 22px 0;
}

.news-grid,
.sports-events,
.bulletin-board,
.simulations-grid,
.gallery,
.video-grid {
  display: grid;
  gap: 16px;
}

.news-grid {
  margin-top: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.sports-events {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.bulletin-board {
  margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.bulletin-calendar-btn {
  margin-top: 14px;
}

.simulations-grid {
  margin-top: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.gallery {
  margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.video-grid {
  margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.calendar-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.calendar-event {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 22px rgba(8, 38, 75, 0.08);
  padding: 15px;
}

.calendar-event h3 {
  color: #12345d;
  margin: 2px 0 4px;
}

.calendar-event p {
  color: var(--muted);
}

.calendar-date {
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f4b92;
  background: rgba(20, 101, 191, 0.1);
  border: 1px solid rgba(20, 101, 191, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
}

.card,
.news-card,
.event-card,
.interview-card,
.bulletin-item,
.comedy-container,
.spotlight-profile,
.article-card,
.video-item {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(8, 38, 75, 0.08);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.card:hover,
.news-card:hover,
.event-card:hover,
.interview-card:hover,
.bulletin-item:hover,
.comedy-container:hover,
.spotlight-profile:hover,
.article-card:hover,
.video-item:hover {
  transform: translateY(-6px);
  border-color: rgba(19, 96, 187, 0.35);
  box-shadow: 0 20px 34px rgba(8, 38, 75, 0.11);
}

.bulletin-item,
.event-card,
.interview-card,
.comedy-container,
.spotlight-profile,
.article-card,
.video-item {
  padding: 16px;
}

.news-card {
  overflow: hidden;
}

.news-img {
  height: 150px;
  background:
    radial-gradient(80% 70% at 20% 0%, rgba(255, 255, 255, 0.7), transparent 70%),
    linear-gradient(135deg, #95c9ff, #2a79cd);
}

.news-content {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.news-inline-photo {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(18, 66, 116, 0.16);
}

.news-content h3,
.event-title,
.interview-title,
.student-name,
.joke-title {
  color: #12345d;
  line-height: 1.35;
}

.event-date,
.event-type,
.event-description,
.interview-meta,
.interview-description,
.student-grade,
.joke-meta,
.long-joke,
.student-description {
  color: var(--muted);
}

.read-more,
.back-link,
button.read-more,
#clearBallsBtn,
#clickBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 11px;
  border: 1px solid rgba(9, 59, 118, 0.2);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 9px 13px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.read-more:hover,
.back-link:hover,
button.read-more:hover,
#clearBallsBtn:hover,
#clickBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(10, 52, 101, 0.28);
}

.back-link {
  margin-top: 14px;
}

.comedy-container {
  margin-top: 14px;
  background: linear-gradient(180deg, #fffdf6 0%, #fff9ee 100%);
}

.comedy-showcase {
  margin-top: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.76);
  padding: clamp(14px, 2.5vw, 22px);
  background:
    radial-gradient(130% 90% at 10% 0%, rgba(43, 146, 255, 0.2), transparent 60%),
    radial-gradient(110% 95% at 100% 100%, rgba(255, 170, 63, 0.16), transparent 65%),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 42px rgba(8, 38, 75, 0.14);
}

.comedy-slideshow {
  min-height: 240px;
  border-radius: var(--radius-md);
  outline: none;
}

.joke-slide {
  display: none;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 70, 132, 0.15);
  background: linear-gradient(180deg, #fffdf7 0%, #fff8ec 100%);
  padding: clamp(16px, 2.7vw, 26px);
}

.joke-slide.active {
  display: grid;
  gap: 12px;
  animation: joke-slide-in 360ms ease;
}

.joke-title {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  margin-bottom: 0;
}

.joke-ending {
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  font-weight: 800;
  color: #0a4e9c;
  background: linear-gradient(135deg, rgba(20, 104, 195, 0.12), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(20, 104, 195, 0.24);
  border-radius: 12px;
  padding: 10px 12px;
}

.joke-meta {
  font-size: 0.86rem;
  margin-top: 2px;
}

.joke-reveal-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(9, 59, 118, 0.2);
  border-radius: 11px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.joke-reveal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(10, 52, 101, 0.25);
}

.joke-slide.is-revealed .joke-reveal-btn {
  opacity: 0.7;
}

.comedy-controls {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slide-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(13, 67, 129, 0.22);
  border-radius: 11px;
  padding: 8px 12px;
  background: #fff;
  color: #0f3f74;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.slide-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(7, 44, 89, 0.12);
}

.slide-indicator {
  font-weight: 800;
  color: #0a4a92;
}

.slide-dots {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slide-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 78, 156, 0.25);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.slide-dot.active {
  transform: scale(1.25);
  background: #0a4e9c;
}

@keyframes joke-slide-in {
  from {
    opacity: 0;
    transform: translate3d(20px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.long-joke {
  white-space: pre-wrap;
}

.spotlight-profile + .spotlight-profile {
  margin-top: 14px;
}

.spotlight-submit-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(16, 85, 160, 0.32);
  background:
    radial-gradient(120% 100% at 10% 0%, rgba(39, 145, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #f9fcff 0%, #f2f8ff 100%);
}

.spotlight-submit-card p {
  color: #355477;
  margin-top: 4px;
}

.spotlight-submit-card .subsection-title {
  margin-bottom: 6px;
}

.student-grade {
  font-weight: 700;
  margin-bottom: 8px;
}

.sports-announcements {
  margin-top: 20px;
  background: linear-gradient(180deg, #f5fff4, #edfbee);
  border: 1px solid rgba(40, 122, 57, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
}

.sports-announcements h3 {
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
}

.achievement-list {
  list-style: none;
  margin-top: 10px;
}

.achievement-list li {
  position: relative;
  padding-left: 18px;
  color: #2f4f38;
  margin-bottom: 8px;
}

.achievement-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 800;
}

#fact-display {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 700;
  color: #0f4b92;
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.simulation-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 16px;
}

#gravityCanvas {
  width: 100%;
  max-width: 310px;
  border-radius: 10px;
  border: 1px solid rgba(14, 70, 131, 0.2);
  background: #f7fbff;
}

.click-test-area {
  width: 100%;
  display: grid;
  gap: 10px;
}

#clickScore,
#clickTimer {
  font-weight: 800;
  color: #0e539f;
}

.reaction-box {
  width: 100%;
  min-height: 140px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #2a7cd0;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

#reactionResult {
  min-height: 1.5em;
  font-weight: 700;
  color: #2d6d39;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(14, 70, 131, 0.14);
  background: #fff;
  box-shadow: 0 8px 20px rgba(10, 45, 90, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(10, 45, 90, 0.12);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
}

.video-item iframe {
  border-radius: 10px;
  border: 0;
}

.home-video-wrap {
  margin-top: 14px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(8, 38, 75, 0.1);
}

.home-video-frame {
  width: 100%;
  height: 100%;
  border: 0;
}

.home-video-panel.reveal {
  transform: translate3d(70px, 0, 0);
}

.section img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(17, 66, 116, 0.15);
}

#lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 9999;
}

#lightbox.active {
  display: grid;
  background: rgba(7, 19, 35, 0.8);
}

#lightbox .lightbox-inner {
  max-width: 94vw;
  max-height: 90vh;
  position: relative;
}

#lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
}

#lightbox .caption {
  margin-top: 8px;
  color: #ebf4ff;
  text-align: center;
}

#lightbox .lightbox-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #0e549f;
  cursor: pointer;
}

#lightbox .lightbox-nav {
  position: absolute;
  inset: 50% 10px auto;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

#lightbox .lightbox-nav button {
  pointer-events: all;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 8px;
  padding: 6px 9px;
  cursor: pointer;
}

footer {
  margin-top: 8px;
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  color: #d8e9fb;
  background: rgba(8, 42, 79, 0.95);
  box-shadow: 0 16px 36px rgba(6, 30, 58, 0.25);
}

footer a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

footer p + p {
  margin-top: 4px;
}

.reveal {
  --reveal-delay: 0ms;
  opacity: 0;
  transform: translate3d(-58px, 0, 0);
  transition:
    opacity 650ms ease var(--reveal-delay),
    transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay);
  will-change: opacity, transform;
}

.reveal.from-right {
  transform: translate3d(58px, 0, 0);
}

.reveal.from-up {
  transform: translate3d(0, 32px, 0);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@keyframes drift-glow {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-10px, 10px, 0) scale(1.08);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.from-right,
  .reveal.from-up,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  header::after {
    animation: none;
  }
}

@media (max-width: 860px) {
  header,
  nav,
  .container,
  footer {
    width: calc(100% - 10px);
    padding-left: 12px;
    padding-right: 12px;
  }

  header {
    margin-top: 10px;
    padding: 16px;
  }

  nav {
    padding: 10px 10px 12px;
  }

  nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  nav a {
    justify-content: center;
    width: 100%;
    text-align: center;
    min-height: 42px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .comedy-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Login Page Styles */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 500px;
  margin: 40px auto;
}

.login-container h3 {
  font-size: 24px;
  color: var(--text);
  font-weight: 700;
}

.login-subtitle {
  color: var(--muted);
  font-size: 14px;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 300px;
  padding: 14px 24px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.google-login-btn:hover {
  background: var(--brand-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21, 105, 197, 0.3);
}

.google-login-btn i {
  font-size: 20px;
}

.login-info {
  background: rgba(34, 197, 94, 0.1);
  border-left: 4px solid var(--success);
  padding: 16px;
  border-radius: 8px;
  max-width: 300px;
  font-size: 14px;
}

.login-info p {
  color: var(--text);
  margin: 0;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  color: #dc2626;
  padding: 14px;
  border-radius: 8px;
  max-width: 300px;
  font-size: 14px;
}
