/* ----------------------------
   STYLESHEET FOR OJIPOJI
------------------------------- */

/* ----------------------------
   GLOBAL STYLES
------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Bungee+Shade&family=Quicksand:wght@300..700&display=swap');

a {
    color: #B00020;
}

.alert {
  padding: 10px;
  margin-bottom: 1rem;
  border-radius: 5px;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-info {
  background: #eef5ff;
  border: 1px solid #a5c6ff;
  border-radius: 6px;
  padding: 12px 16px;
  color: #003366;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

body {
    background-color: #FFCC33; /* Sunglow */
    font-family: 'Quicksand', sans-serif;
    color: #330033; /* Plum */
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: clamp(150px, 8vw, 400px);
}

hr {
    width: 500px;
    margin: auto;
}

html {
  height: 100%;
  margin: 0;
}

input {
  width: 100%;
}

label {
  margin-right: 20px;
}

p {
  font-weight: 500;
}

table {
  width: 80%;
  margin: auto;
}

textarea {
  width: 100%;
  min-height: 300px;
  box-sizing: border-box;
}

ul {
      font-weight: 500;
}

/* ----------------------------
   GAME CLASSES
------------------------------- */

.answer {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    position: relative;
    overflow: visible;
    z-index: 2;  /* Form appears above card if overlapping */
}

.answer form {
    display: flex;
    width: 500px;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    overflow: visible;
}

.answer input {
    flex: 1;
    width: auto;
    height: 48px;
    font-size: 18px;
    border: 2px solid #350026;
    border-radius: 8px;
    padding: 0 12px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.2s ease;
}

.answer input:focus {
  outline: none;
  box-shadow: 0 0 4px 2px #FFD44C;
}

.bluesky {
  width: 500px;
  margin-top: 20px;
  margin-left: 0px;
  margin-right: 0px;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  overflow: visible;
}

.bluesky form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 500px;
  overflow: visible;
}

.btn.btn-primary {
  background: linear-gradient(#4B0037, #2C0021);
  color: #FFF9F2;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  transition: transform 0.1s ease;
  box-shadow: 0 4px 0 #200016;

}

.btn.btn-primary:hover {
  transform: translateY(-2px);
}

.btn.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #200016;
}

.card-flipped {
  transform: rotateY(180deg);
}

.card-wrapper {
  width: 100%;
  margin: 0 auto;
  transition: box-shadow 0.4s ease-in-out, opacity 0.6s ease-out;
  position: relative;
}

.card-wrapper.fade-out {
  opacity: 0;
  pointer-events: none;
}

.challenge-cards {
  display: flex;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  transition: opacity 0.6s ease-in;
  justify-content: center;
}

.challenge-cards.visible {
  opacity: 1;
}

.challenge-input {
  font-weight: 600;
  padding-left: 10px;
  height: 48px;
  font-size: 18px;
  border: 2px solid #350026;
  border-radius: 8px;
  padding: 0 12px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.2s ease;
}

.challenge-wrapper {
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin-inline: auto;
}

.come-back-message {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  text-align: center;
  margin-top: 1rem;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
}

.come-back-message.visible {
  opacity: 1;
}

.current-player {
  background-color: #FFE67A;
  font-weight: bold;
}

.daily-draw {
    width: 500px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.fade-out {
  transition: opacity 0.6s ease;
  opacity: 0;
}

.flip-card {
    perspective: 1000px;
    width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.flip-card-inner {
    width: 100%;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
}

.flip-card-inner.card-flipped {
  transform: rotateY(180deg);
}

.flip-card-face {
    position: absolute;
    width: 100%;
    height: 200px;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.flip-card-back { 
    transform: rotateY(180deg); 
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    align-items: flex-start; 
}

form {
  opacity: 1;
  max-height: 500px;
  overflow: hidden;
  transition: opacity .6s ease,
              max-height .6s ease;
}

form.hide {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: all .6s ease;
}

.goodbye {
  position: fixed;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 1000;
  pointer-events: none;
  z-index: 1000;
}

.goodbye.visible {
  opacity: 1;
  pointer-events: auto;
}

.handle {
  color: #330033;
  font-weight: 600;
}

.leaderboard{
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.leaderboard-card {
  background-color: #FFF8ED;
  border: 5px solid #330033;
  border-radius: 0 8px 0 8px;
  outline: 8px solid #FFF8ED;
  outline-offset: 0px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  padding: 24px;
  max-width: 700px;
  margin: 40px auto;
  font-family: 'Quicksand', sans-serif;
}

.leaderboard-head {
  text-align: center;
  font-size: 2rem;
  color: #330033;
  margin-top: 8px;
  margin-bottom: 24px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid #FFD44C;
}

.leaderboard-table th {
  color: #330033;
  font-weight: 700;
}

.leaderboard-table tr:nth-child(even) {
  background-color: #FFF3D1;
}

.player-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 30px;
  font-size: 1.2rem;
  transition: opacity 0.6s ease-in-out;
  opacity: 1;
}

.player-info.fade-out {
  opacity: 0;
}


.question-card {
    width: 500px;
    background-color: #fff9f2;
    padding: 15px;
    border: 5px solid #330033;
    border-radius: 0 8px 0 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
    outline: 8px solid #FFF8ED;
    outline-offset: 0px;
    font-size:large;
    word-wrap: break-word;
    transition: transform 0.2 ease;
}

.question-wrapper {
    display: flex;
    width: 500px;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.rank {
  position: relative;
  display: inline-block;
  color: #330033;
  font-weight: 1000;
  font-size: 1.3rem;
}

.rank-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 32px 0 0;
}

.ribbon {
  position: absolute;
  top: -12px;
  left: -12px;
  background: #B00020;
  color: white;
  font-weight: bold;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  transform: rotate(-5deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.score-box {
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  pointer-events: none;
  z-index: 1000;
}

.score-box.visible {
  opacity: 1;
  pointer-events: auto;
}

.score-pill {
  background: #330033;
  color: #FFF9F2;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}


/* ----------------------------
   OTHER PAGE CLASSES
------------------------------- */

.blog {
    justify-content: center;
    max-width: 900px;
    background-color: #FFF8ED;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    padding-top: 25px;
    padding-bottom: 25px;
    padding-left: 40px;
    padding-right: 40px;
    border-radius: 8px;
}

.blog-header {
  font-size: 3vw;
  line-height: 1;
}

.blog-image {
  display: block;
  justify-content: center;
  max-width: 820px;
  margin-bottom: 25px;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
}

.blog-menu {
    display: flex;
    justify-content: center;
    max-width: 900px;
    margin: auto;
    padding-bottom: 25px;
}

.btn-primary {
    background-color: #330033;
}

.contact {
  max-width: 800px;
  margin: 64px auto;
  padding: 32px 24px;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #330033;
  background-color: #fff9f2;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
  overflow: visible;
}

.description {
    justify-content: center;
    max-width: 448px;
    text-wrap: pretty;
    margin: auto;
}

.footer {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    text-align: center;
    background-color: #330033;
}

.form-group {
    display: block;
    justify-content: center;
    width: 90%;
    font-size: 20px;
    margin: auto;

}

.hero {
  display: flex;
  justify-content: center;
  text-align: center;
}

.rules {
  max-width: 800px;
  margin: 64px auto;
  padding: 32px 24px;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #330033;
  background-color: #fff9f2;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
}

.rules h1{
  font-size: 28px;
  margin-bottom: 24px;
  text-align: center;
}

.rules ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.privacy-policy {
  max-width: 800px;
  margin: 64px auto;
  padding: 32px 24px;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #330033;
  background-color: #fff9f2;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
}
.privacy-policy h1 {
  font-size: 28px;
  margin-bottom: 24px;
  text-align: center;
}
.privacy-policy h2 {
  font-size: 20px;
  margin-top: 24px;
  margin-bottom: 8px;
}
.privacy-policy ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.terms-container {
  max-width: 800px;
  margin: 64px auto;
  padding: 32px 24px;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #330033;
  background-color: #fff9f2;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
  }

  .terms-container h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
  }

  .terms-container h2 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 4px;
  }

  .terms-container p {
    margin-bottom: 1rem;
  }

  .terms-container ul {
    list-style-type: disc;
    margin-left: 1.25rem;
  }

  .terms-container li {
    margin-bottom: 0.5rem;
  }

  .terms-container a {
    text-decoration: underline;
  }

/* ----------------------------
   NAVIGATION/LAYOUT CLASSES
------------------------------- */

.footer-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;          /* three equal columns */
  gap: 15px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

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

.footer-copy  { text-align: center; align-items: center;  font-weight: 700; }

.footer-legal { text-align: left;  align-items: flex-start; }

.footer-nav   { text-align: right; align-items: flex-end; }

.footer-nav img {
  width: 24px; height: 24px;
  cursor: pointer;
  transition: transform .2s;
}
.footer-nav img:hover { transform: scale(1.15); }

.login {
  padding: 16px 24px;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.login p {
  font-weight: 600;
}

.logo {
  font-family: 'Bungee Shade', cursive;
  font-size: 3rem;
  color: #330033;
  letter-spacing: 1px;
  margin: 0;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.marquee-header {
  width: 100%;
  background: linear-gradient(to bottom, #FFE67A, #FFCC33);
  border-bottom: 4px solid #330033;
  box-shadow: inset 0 -6px 0 #FFF8ED;
  padding: 16px 24px;
  position: relative;
}

.marquee-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.navbar {
    background-color: #FFCC33;
    padding-top: 40px;
}

.navbar-toggler {
  margin-left: 20px;
}

.nav-link {
  font-size: 1rem;
  font-weight: 700;
  color: #330033;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #B00020;
}

.site-footer {
  background: linear-gradient(to top, #FFE67A, #FFCC33);
  color: #330033;
  border-top: 4px solid #330033;
  box-shadow: inset 0 3px 0 #FFF8ED;
  padding: 24px 15px 15px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  flex: 0 0 auto;
  margin-top: auto; 
  display: flex;
  align-items: center;
}

.site-footer a {
  color: #330033;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
}

.site-footer a:hover { color:#B00020;}

.top-links {
  display: flex;
  gap: 16px;
}

/* ----------------------------
   ANSWER LIGHTS
------------------------------- */
.marquee-lights {
    position: absolute;
    inset: -30px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    
    --light-color: #FFF8ED;
    --glow-color: rgba(255, 255, 200, 0.8);
}

.marquee-lights .light-bulb {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--light-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--glow-color);
    animation: twinkle 2s infinite ease-in-out;
}

.lights-correct {
    --light-color: #1de9b6;
    --glow-color: rgba(29, 233, 182, 0.8);
    opacity: 1;
}

.lights-wrong {
    --light-color: #e74c3c;
    --glow-color: rgba(231, 76, 60, 0.8);
    opacity: 1;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}


/* ----------------------------
   MOBILE CLASSES
------------------------------- */

@media (max-width: 600px) {
  
  :root {
    --card-width: 90vw;          /* shrink cards to nearly full-width */
    --card-padding: 12px;        /* lighter padding on small screens  */
  }

  .answer .btn {
     align-self: stretch;         /* full-width button tap target */
  }
  
  .answer form {
    width: var(--card-width);
    flex-direction: column;
    margin-top: 0px;
  }

  .answer .form-control {
    font-size: 1rem;
    padding: 12px 14px;          /* ↑ taller tap target   */
    font-size: 1.05rem;          /* ↑ easier to read      */
    line-height: 1.4;
  }

  .blog {
    justify-content: center;
    max-width: 90vw;
  }

  .blog-image {
    max-width: 95%;
  }

  .bluesky {
    width: var(--card-width);
    margin: 30px auto 30px;

    overflow: visible;
  }

  .bluesky .btn {
    align-self: stretch;
    overflow: visible;
  }

  .bluesky form {
    flex-direction: column;     /* input over button */
    gap: 20px;
    overflow: visible;
  }

  .challenge-cards {
    flex-direction: column;      /* stack the wrappers */
    align-items: center;
    gap: 32px;                   /* breathing room between the two cards */
  }

  .challenge-input {
    width: 100%;
    padding: 12px 14px;         /* taller tap target */
    font-size: 1rem;
  }

  .challenge-wrapper {
    width: var(--card-width);
  }

  .contact {
    justify-content: center;
    max-width: 90vw;
  }

  .daily-draw {
    width: var(--card-width);
    margin: 0 auto 24px;
    padding-top: 4px;
  }

  .flip-card,
  .question-wrapper {
    width: var(--card-width);
  }

  .flip-card-inner,
  .flip-card-face,
  .flip-card-back {
    height: auto;
    min-height: 160px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    row-gap: 24px;
    margin-top: 25px;
  }
  .footer-legal,
  .footer-nav { align-items: center; }

  .logo {
    font-size: 2.2rem;
  }

  .marquee-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

.marquee-lights {
        --card-width: 350; /* Adjust for your mobile card width */
        --card-height: 100; /* Adjust for your mobile card height */
        --light-spacing: 20; /* Tighter spacing for smaller screen */
        inset: -20px; /* Smaller halo on mobile */
    }
    
    .marquee-lights .light-bulb {
        width: 8px; /* Slightly smaller lights on mobile */
        height: 8px;
    }

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  .player-info {
    flex-direction: column;      /* stack handle + score */
    gap: 4px;
    margin: 12px 0 20px;
    font-size: 1rem;             /* down from 1.2 rem */
  }

  .question-card {
    width: 100%;                 /* 100 % of var(--card-width) */
    padding: var(--card-padding);
    font-size: clamp(0.95rem, 4vw, 1.1rem);
  }

  .submission-bar {
    flex-direction: column;
    gap: 12px;
    width: 90%;
  }
  
}
