/* gobboapp.css */

/* Import Medodica font */
@font-face {
  font-family: 'Medodica';
  src: url('https://gobbovideo.com/public/fonts/MedodicaRegular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* Force white text everywhere */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: 'Medodica', Arial, sans-serif !important;
  color: white !important;
}

/* Form controls and placeholders */
input,
textarea,
select,
button {
  color: white !important;
  font-family: 'Medodica', Arial, sans-serif !important;
  background-color: transparent;
  border: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* SVG text white */
svg text {
  fill: white !important;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100vh;
}

a {
  color: white !important;
  text-decoration: none;
}

/* Top nav */
header {
  background: rgba(107, 142, 35, 0.7);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  height: 70px;
  flex-shrink: 0;
}

#logo {
  height: 64px;
  margin-right: 1rem;
  cursor: pointer;
}

nav.desktop-menu {
  display: flex;
  gap: 1rem;
}

nav.desktop-menu a {
  padding: 1rem;
  font-weight: bold;
  font-size: 1.2rem;
  border-bottom: 3px solid transparent;
}

nav.desktop-menu a.active {
  border-bottom: 4px solid #add481;
}

/* ======= System Message Banner ======= */
.system-message {
  width: 100%;
  background: rgb(0, 0, 0);
  color: white;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  padding: 12px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  display: none; /* toggled by JS */
}

.system-message span {
  display: inline-block;
  max-width: 100%;
  margin: 0 auto;
  line-height: 0.8;
  white-space: normal;
  word-wrap: break-word;
}


/* Shift content down when banner visible */
body.has-system-message #main-content {
  margin-top: 50px; /* adjust to banner height */
}

/* Main content */
#main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
  width: 100%;
  max-width: 1100px; /* limit width so cards don't get too wide */
  margin: 0 auto; /* center container */
  box-sizing: border-box;
}

/* Hide mobile nav by default (desktop) */
nav.mobile-menu {
  display: none;
}

/* Mobile-only nav: cleaner pill buttons, uses same font */
@media (max-width: 768px) {
  nav.desktop-menu {
    display: none;
  }

  nav.mobile-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: env(safe-area-inset-bottom, 0);
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.45));
    z-index: 1000;
    box-shadow: 0 -6px 18px rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
  }

  /* Each nav link becomes a clean pill-shaped button */
  nav.mobile-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    min-width: 56px;
    background: rgba(255,255,255,0.03);
    color: #a2ff00;
    font-weight: 700;
    font-size: 1.05rem; /* slightly larger for readability on mobile */
    text-transform: none;
    border: 1px solid rgba(162,255,0,0.06);
    transition: transform .15s ease, background .15s ease, color .15s ease;
    /* By default each button will expand to fill available space evenly */
    flex: 1 1 0;
    max-width: 160px;
  }

  nav.mobile-menu a:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.05);
  }

  nav.mobile-menu a svg {
    height: 18px;
    width: 18px;
    margin: 0;
    fill: currentColor;
  }

  nav.mobile-menu a.active {
    background: linear-gradient(90deg,#8ab72e,#a2ff00);
    color: #000;
    box-shadow: 0 6px 14px rgba(138,183,46,0.16);
    transform: translateY(-2px);
  }

  /* nav-center: keep buttons sized to content and centered */
  nav.mobile-menu.nav-center {
    justify-content: center;
  }

  nav.mobile-menu.nav-center a {
    flex: 0 0 auto;
    max-width: none;
    margin: 0 6px;
  }

  nav.mobile-menu .profile-link img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(162,255,0,0.9);
  }

  #main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: calc(84px + env(safe-area-inset-bottom)); /* enough space for nav */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    /* Hide scrollbar for Firefox */
    scrollbar-width: none;
    /* Hide scrollbar for IE, Edge */
    -ms-overflow-style: none;
  }
}

/* Hide scrollbar for Chrome, Safari, Opera */
#main-content::-webkit-scrollbar {
  display: none;
}

/* On desktop, reduce bottom padding */
@media (min-width: 993px) {
  #main-content {
    padding-bottom: 1rem;
  }
}

/* Hide all scrollbars on widths less than desktop (992px) */
@media (max-width: 991px) {
  * {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  *::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
}

/* Spinner */
.spinner {
  margin: 3rem auto;
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ======= Video Cards ======= */
.videos-container {
  display: grid;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: 1fr; /* Mobile default: 1 column */
  justify-items: center; /* center cards horizontally */
}

/* Tablet: 2 columns */
@media (min-width: 600px) {
  .videos-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: exactly 3 columns */
@media (min-width: 992px) {
  .videos-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
