/* ================================
   Sunshine Cereals Theme (Bootstrap 4 friendly)
   Palette: Yellow #FAF601, Red #D41720, White #FFFFFF
   Child + Mobile friendly styles with gradients
   ================================ */

:root{
  --sun-yellow: #FAF601;
  --sun-red:    #D41720;
  --sun-white:  #FFFFFF;

  /* Support colors derived from the palette for contrast & depth */
  --ink:        #111111;   /* readable on yellow/white */
  --ink-soft:   #333333;
  --white-80:   rgba(255,255,255,.8);
  --red-90:     rgba(212,23,32,.9);
  --yellow-90:  rgba(250,246,1,.9);

  /* Gradients */
  --g-sunrise:  linear-gradient(135deg, var(--sun-yellow) 0%, var(--sun-red) 100%);
  --g-gleam:    linear-gradient(180deg, var(--sun-white) 0%, rgba(250,246,1,.25) 100%);
  --g-hero:     linear-gradient(180deg, rgba(250,246,1,.55) 0%, rgba(212,23,32,.25) 100%);
  --g-tab:      linear-gradient(135deg, var(--sun-yellow) 0%, #ffe600 60%, #ffd400 100%);
  --g-card:     linear-gradient(180deg, #ffffff 0%, rgba(250,246,1,.15) 100%);

  /* Radii / shadows for kid-friendly UI */
  --r-lg:       16px;
  --r-xl:       20px;
  --shadow-1:   0 6px 16px rgba(0,0,0,.08);
  --shadow-2:   0 10px 24px rgba(0,0,0,.12);
}

/* Base */
html, body{
  background: var(--g-gleam);
  color: var(--ink);
}
body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tappable / focusable */
*:focus { outline: none; }
:focus-visible {
  box-shadow: 0 0 0 3px var(--sun-yellow), 0 0 0 6px var(--sun-red) !important;
  border-radius: 10px;
}

/* ---------------- Hero / Poster ---------------- */
/* #Poster{
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: var(--r-xl);
  border-bottom-right-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
}
#Poster video{
  width: 100%;
  height: 60vh;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
} */
.Overlay{
  position: absolute;
  inset: 0;
  /* background: var(--g-hero); */
  pointer-events: none;
}

/* ---------------- Heading / Top Menu ---------------- */
.Heading{
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: .5rem .75rem;
  background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.85) 100%);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--sun-yellow);
}
#HomeBand{
  height: 6px;
  background: var(--g-sunrise);
  border-radius: 10px;
  margin: .25rem 0 .5rem;
}
a.Home img.Home{
  height: 44px;
  width: auto;
  border-radius: 10px;
  padding: 4px;
  background: var(--sun-white);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Menu items are divs; make them feel like buttons */
.Heading .Menu{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.Heading .Menu .Item{
  background: var(--sun-white);
  border: 2px solid var(--sun-yellow);
  color: var(--ink);
  padding: .45rem .8rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: var(--shadow-1);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  cursor: pointer;
}
.Heading .Menu .Item:hover{
  background: var(--g-tab);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.Heading .Menu .Item:active{
  transform: translateY(0);
}
.Heading .Menu .Item[aria-selected="true"],
.Heading .Menu .Item.is-active{
  background: var(--g-sunrise);
  color: var(--sun-white);
  border-color: transparent;
}

/* Scroll prompt */
#ScrollPrompt .scroll{
  color: var(--ink);
  font-weight: 700;
}

/* ---------------- Buttons ---------------- */
.btn{
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
  padding: .6rem 1rem;
}
.btn-primary{
  border: 0;
  background-image: var(--g-sunrise);
  color: var(--sun-white);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover{ filter: brightness(1.05); box-shadow: var(--shadow-2); }
.btn-primary:active{ filter: brightness(.95); }
.btn-outline-primary{
  color: var(--sun-red);
  border-color: var(--sun-red);
}
.btn-outline-primary:hover{
  background: var(--sun-red);
  color: var(--sun-white);
}

/* Utility accent pills */
.badge-sun{
  background: var(--sun-yellow);
  color: var(--ink);
  border-radius: 999px;
  padding: .35rem .6rem;
  font-weight: 700;
}

/* ---------------- Tabs (Bootstrap) ---------------- */
.nav-tabs{
  border-bottom: 3px solid var(--sun-white);
}
.nav-tabs .nav-link{
  border: 0 !important;
  margin-right: .25rem;
  background: var(--sun-white);
  color: var(--ink);
  border-radius: 999px !important;
  padding: .5rem .9rem;
  font-weight: 700;
  box-shadow: var(--shadow-1);
}
.nav-tabs .nav-link:hover{
  background: var(--g-tab);
}
.nav-tabs .nav-link.active{
  background: var(--g-sunrise) !important;
  color: var(--sun-white) !important;
  box-shadow: var(--shadow-2);
}

/* ---------------- Cards & “Activities” ---------------- */
.card{
  border: 0;
  border-radius: var(--r-lg);
  background: var(--g-card);
  box-shadow: var(--shadow-1);
}
.card-img-top{
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
}
.card-title{
  font-weight: 800;
}
#xGamesSection .game-link{
  border-radius: var(--r-lg);
}
#xGamesSection .btn{
  background-image: var(--g-sunrise);
  color: var(--sun-white);
}

/* Horizontal scroller padding on mobile */
#xGamesSection .row.flex-nowrap{
  scroll-snap-type: x mandatory;
}
#xGamesSection .col-8,
#xGamesSection .col-sm-6{
  scroll-snap-align: start;
}

/* ---------------- DataTables / Scoreboard ---------------- */
#Scoreboard h3{
  font-weight: 900;
  background: linear-gradient(90deg, var(--sun-red), var(--sun-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#tableweeklytable_wrapper .dataTables_filter input{
  border-radius: 999px;
  border: 2px solid var(--sun-red);
  padding: .4rem .8rem;
}
#tableweeklytable thead th{
  background: var(--g-tab);
  color: var(--ink);
  font-weight: 800;
  border: 0 !important;
}
#tableweeklytable tbody tr:nth-child(odd){
  background: rgba(250,246,1,.10);
}
#tableweeklytable tbody tr:hover{
  background: rgba(212,23,32,.06);
}
#tableweeklytable tbody td{
  vertical-align: middle;
}

/* Loading state */
#tableweeklytable_loading .progressname{
  color: var(--sun-red);
}

/* ---------------- Gallery (Owl Carousel) ---------------- */
.gallery-tabs .nav-link{
  font-weight: 800;
}
.gallery-tabs .nav-link.active{
  background: var(--g-sunrise) !important;
  color: var(--sun-white) !important;
}
.gallery-item{
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  background: var(--sun-white);
}
.gallery-item img{
  width: 100%;
  height: 240px;
  object-fit: cover;
}
.gallery-caption{
  padding: .75rem .9rem;
  background: linear-gradient(180deg, #fff 0%, rgba(250,246,1,.25) 100%);
}
.carousel-arrow{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sun-yellow);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  border: 2px solid var(--sun-red);
  font-weight: 900;
}

/* ---------------- About ---------------- */
#xAboutSection h1{
  font-weight: 900;
  background: var(--g-sunrise);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#xAboutSection p strong{
  color: var(--sun-red);
}

/* ---------------- Back To Top ---------------- */
#BackToTop{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--g-sunrise);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-2);
  border: 3px solid var(--sun-white);
  cursor: pointer;
  z-index: 1040;
}
#BackToTop img{
  width: 26px;
  height: 26px;
}

/* ---------------- Forms ---------------- */
form{
  text-align: center; /* preserve existing */
}
form .btn{
  min-width: 200px;
}

/* ---------------- Helpers ---------------- */
.rounded-xl{ border-radius: var(--r-xl) !important; }
.text-sun-red{ color: var(--sun-red) !important; }
.text-sun-yellow{ color: var(--sun-yellow) !important; }
.bg-sun-yellow{ background-color: var(--sun-yellow) !important; }
.bg-sun-red{ background-color: var(--sun-red) !important; color: var(--sun-white) !important; }

/* ---------------- Mobile-first Tweaks ---------------- */
@media (max-width: 992px){
  /* #Poster video{ height: 48vh; } */
  .Heading .Menu{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .Heading .Menu .Item{ flex: 0 0 auto; }
}

@media (max-width: 576px){
  body{ font-size: 16px; }
  a.Home img.Home{ height: 40px; }
  .Heading{ padding: .5rem .5rem; }
  .nav-tabs .nav-link{ padding: .45rem .75rem; }
  .card-title{ font-size: 1rem; }
  #tableweeklytable_wrapper .dataTables_length label,
  #tableweeklytable_wrapper .dataTables_filter label{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  #tableweeklytable_wrapper .dataTables_filter input{
    width: 60%;
  }
  .carousel-arrow{ width: 40px; height: 40px; }
}

/* ---------------- High-contrast mode for accessibility ---------------- */
@media (prefers-contrast: more){
  .btn-primary, .nav-tabs .nav-link.active{
    box-shadow: 0 0 0 3px var(--sun-white), 0 0 0 6px var(--sun-red);
  }
}

#page-footer{
  display: none;
}
.true-footer{
  display: none;
}
