/* === Custom Fonts === */ 
@font-face {
  font-family: "Maldives";
  src: url("Fonts/Maldives.otf") format("opentype");
}
@font-face {
  font-family: "Yeti";
  src: url("Fonts/Yeti.ttf") format("truetype");
}
@font-face {
  font-family: "Arizonia";
  src: url("Fonts/Arizonia.ttf") format("truetype");
}
@font-face {
  font-family: "Coopers";
  src: url("Fonts/Coopers.ttf") format("truetype");
}
@font-face {
  font-family: "Acme";
  src: url("Fonts/Acme.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6fb;
  color: #222;
}

/* === Main Title Above Header === */
.main-title {
  background: #fff;
  padding: 16px 32px 4px;
  text-align: left;         /* 🟩 left-aligned on web */
  border-bottom: none;      /* 🟩 remove line separator */
}

.main-title h1 {
  font-family: "Arizonia";
  font-size: 64px;
  margin: 0;
  color: #222;
}

/* Mobile: center title on small screens */
@media (max-width: 700px) {
  .main-title {
    text-align: center;     /* 🟩 center only on mobile */
    padding: 12px 0 4px;
  }

  .main-title h1 {
    font-size: 42px;
  }
}


/* === Header === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid #eee;
  min-height: 80px;
}

/* Left side (subtitle) */
.header-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 1 60%;    /* shrink to about 60% of header width */
  max-width: 700px; /* prevents stretching too wide on large screens */
  padding-right: 30px; /* 🟩 breathing space between subtitle and icons */
}

#subtitle-text {
  font-family: "Acme";
  font-size: 20px;
  color: #555;
  margin-top: 4px;
}


/* Right side (Woof link) */
.header-right {
  font-family: "Coopers";
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 0px; /* spacing between icons and woof */
  flex-wrap: nowrap; /* prevent stacking */
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}


.social-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.social-icon:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

/* === “Woof” link hover/click feedback === */
#submenu01-text {
  display: inline-block; /* allows transform to apply */
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#submenu01-text:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

#submenu01-text:active {
  transform: scale(0.95);
  opacity: 0.9;
}




/* === Mobile (still inline, but centered for balance) === */
@media (max-width: 700px) {
  .header-right {
    justify-content: center;
    gap: 0px; /* tighter spacing */
  }
  .social-icons {
    justify-content: center;
  }
  nav ul {
    display: flex;
    align-items: center;
  }
}




nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
nav li {
  display: inline;
  margin-left: 20px;
}
nav a {
  text-decoration: none;
  color: #555;
  font-family: "Coopers";
}

/* === Main Content === */
main {
  display: flex;
  gap: 32px;
  padding: 28px 36px;
}
.main-content {
  flex: 1;
  text-align: center;
}
.cat-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cat-wrap {
  position: relative;
  width: 460px;
  max-width: 97%;
}
.cat-wrap img {
  width: 100%;
  cursor: pointer;
  transition: transform 0.08s ease;
  display: block;
}
.cat-wrap img.popped {
  transform: scale(0.96) translateY(2px);
}

/* === Rhythm Lane (Centered Target, Notes from Both Sides) === */
.rhythm-lane {
  position: relative;
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

/* 🎯 Target Icon (centered image) */
#target-icon {
  width: clamp(36px, 6vw, 56px);
  height: clamp(36px, 6vw, 56px);
  opacity: 1;
  user-select: none;
  pointer-events: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* Flash effect when hit */
#target-icon.hit {
  transform: scale(1.1);
  filter: drop-shadow(0 0 4px #ffffff);
}

/* === Note container === */
#note-container {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
}

/* 🎵 Notes — pinkish purple, traveling horizontally */
.note {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(20px, 3vw, 30px);
  color: #f9a7ff;
  user-select: none;
  pointer-events: none;
}


/* === Mobile scaling === */
@media (max-width: 700px) {
  .rhythm-lane {
    height: 70px;
  }
  #target-icon {
    width: 48px;
    height: 48px;
  }
  .note {
    font-size: 28px;
  }
}

@media (max-width: 400px) {
  .rhythm-lane {
    height: 50px;
  }
  #target-icon {
    font-size: 30px;
  }
  .note {
    font-size: 22px;
  }
}

/* === Unified Tap Zone (Cat + Rhythm Lane) === */
.tap-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.tap-zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* invisible but interactive */
  z-index: 1;
}



/* === Floating Numbers === */
#floating-numbers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.floating {
  position: absolute;
  font-family: "Coopers";
  font-weight: 400;
  font-size: 30px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.25);
  animation: floatUp 3s ease-out forwards;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 600px) {
  .floating {
    font-size: 15px;
  }
}
@keyframes floatUp {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  40% {
    transform: translateX(-50%) translateY(-180px);
    opacity: 1;
  }
  80% {
    transform: translateX(-50%) translateY(-280px);
    opacity: 0.6;
  }
  100% {
    transform: translateX(-50%) translateY(-350px);
    opacity: 0;
  }
}

/* === Paragraph Titles, Subtitles, and Local Count === */
#paragraph-title-text,
#paragraph-title2-text {
  font-family: "Acme";
  font-size: 22px;
  color: #222;
}

.paragraph-subtitle-text,
#local-label {
font-family: "Coopers";
  font-size: 16px;
  color: #222;
}


#submenu-sort-count,
#submenu-sort-alpha {
  font-family: "Coopers";
  font-size: 18px;
  color: #444;
}

.local-count {
  font-family: "Acme";
  font-size: 30px;
  font-weight: Bold;
  color: #222;
  
   /* positioning (new additions) */
  position: relative;   /* allows #combo-bonus to float beside it */
  display: inline-block;
  text-align: center;
  min-width: 3ch;       /* prevents shifting when numbers change */
}


/* === Bottom Info Layout (flag + centered local count) === */
.bottom-info {
  display: flex;
  align-items: center;
  justify-content: center; /* centers the flag + count horizontally */
  gap: 10px;
}

#combo-bonus {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 8px;
  transform: translateY(-50%);
  font-family: "Coopers";
  font-size: 22px;
  font-weight: 700;
  color: #4caf50;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#combo-bonus.show {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}



/* === Leaderboard === */
.leaderboard-aside {
  width: 320px;
}
.leaderboard-list {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  max-height: 520px;
  overflow-y: auto;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f2f5;
}
.rank {
  width: 32px;
  font-weight: 700;
}
.flag {
  width: 32px;
  height: 20px;
  border-radius: 3px;
}
.name {
  flex: 1;
  font-family: "Maldives";
}
.count {
  width: 100px;
  text-align: right;
  font-weight: 700;
  font-family: "Acme";
}

/* === Responsive Wrapping (prevents hidden leaderboard) === */
@media (max-width: 1200px) {
  main {
    flex-wrap: wrap;
    justify-content: center;
  }
  .main-content, .leaderboard-aside {
    width: 100%;
    max-width: 800px;
  }
  .leaderboard-aside {
    margin-top: 30px;
  }
}

/* === Responsive scaling for cat image === */

@media (min-width: 900px) {
  .cat-wrap {
    width: 800px;  /* 2× for desktops */
    max-width: none;
  }
}


/* === Mobile Header Adjustments (icons above Woof, center title) === */
@media (max-width: 700px) {
  .header-left {
    text-align: left; /* subtitle stays left */
    padding-right: 5px; /* reset on small screens */
  }

  /* 🟩 Reduce subtitle size on Android / mobile */
  #subtitle-text {
    font-size: 18px;   /* smaller for mobile */
    line-height: 1.2;  /* tighter spacing looks cleaner */
  }

  .main-title h1 {
    font-size: 50px;
  }
  .header-right {
    justify-content: center; /* keep single row centered */
    flex-wrap: nowrap;
  }
  nav ul {
    display: flex;
    align-items: center;
    flex-direction: row; /* ensure Woof stays inline */
    gap: 0;
  }
}
/* === Dynamic scaling for cat image on small screens === */
@media (max-width: 600px) {
  .cat-wrap {
    width: clamp(360px, 80vw, 460px); /* smooth scaling for phones */
    max-width: 97%;                   /* prevent overflow */
  }
}


/* === About Page Layout === */
.about-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3.5rem;
  padding: 40px 60px;
  flex-wrap: wrap; /* ✅ allow wrapping so text doesn’t overflow */
}

.about-text {
  flex: 1 1 60%; /* ✅ allows it to fill ~60% of the layout */
  min-width: 300px;    /* keep a safe min width */
  max-width: 1400px; /* widen limit for desktop */
}

.about-text h1, .about-text h2 {
  font-family: "Coopers";
  font-size: 22px;
  margin-bottom: 10px;
  color: #222;
}

.about-text p {
  font-family: "Acme";
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #333;
}

.mission-image {
  display: block;
  margin: 24px auto;    /* keep centered between paragraphs */
  max-width: 80%;       /* nicely scaled for desktop */
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === Team Members === */
.about-members {
  flex: 0 0 240px;
  max-height: 80vh;
  overflow-y: auto;
  border-left: 1px solid #ccc;
  padding-left: 20px;
}

.about-members h3 {
  text-align: center;
  font-family: "Coopers";
  font-size: 18px;
  margin-bottom: 15px;
}

.member-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.member {
  text-align: center;
}

.member img {
  width: 150px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 8px;
}

.member p {
  font-family: "Acme";
  font-size: 15px;
  margin: 0;
}

/* === Feedback Text: GOOD / MISS === */
.floating.good {
  font-size: 32px;
  color: #9fd373;              /* teal green for success */
  text-shadow: 0 0 2px rgba(103, 103, 103, 0.8);
  animation: goodPop 1s ease-out forwards;
  font-family: "Coopers";
  font-weight: 700;
}

.floating.miss {
  font-size: 32px;
  color: #f1170b;              /* soft red for miss */
  text-shadow: 0 0 2px rgba(103, 103, 103, 0.8);
  animation: missDrop 1s ease-out forwards;
  font-family: "Coopers";
  font-weight: 700;
}

.floating.boo {
  color: #ff3333;
  font-size: 1.8em;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
}


/* Animations for feedback */
@keyframes goodPop {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.8; }
  40% { transform: translate(-50%, -70%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -160%) scale(1); opacity: 0; }
}

@keyframes missDrop {
  0% { transform: translate(-50%, -40%) scale(1); opacity: 0.8; }
  30% { transform: translate(-50%, -20%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, 50%) scale(0.9); opacity: 0; }
}


/* === Combo Effects === */
.floating.combo {
  font-size: 38px;
  color: #ffeb3b; /* bright yellow */
  text-shadow: 0 0 2px rgba(128, 128, 128, 0.9);
  font-family: "Coopers";
  font-weight: 900;
  animation: comboRise 2s ease-out forwards;
  z-index: 100;
}

.floating.combo-break {
  font-size: 33px;
  color: #ff8800;
  text-shadow: 0 0 2px rgba(128, 128, 128, 0.6);
  font-family: "Coopers";
  font-weight: 800;
  animation: comboFall 1.2s ease-out forwards;
  z-index: 100;
}

@keyframes comboRise {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.9; }
  30% { transform: translate(-50%, -175%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -400%) scale(1); opacity: 0; }
}

@keyframes comboFall {
  0% { transform: translate(-50%, -30%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, 10%) scale(1.1); opacity: 0.8; }
  100% { transform: translate(-50%, 50%) scale(0.9); opacity: 0; }
}



/* --- Tablet range: make members horizontal earlier --- */
@media (max-width: 860px) {
  .about-layout {
    flex-direction: column;       /* ✅ stack text and members vertically */
    align-items: stretch;         /* ✅ let both fill full width */
  }

  .about-members {
    flex: none;
    width: 100%;
    border-left: none;
    border-top: 1px solid #ccc;
    padding-left: 0;
    padding-top: 20px;
    max-height: 80vh;     /* ✅ limit height so vertical scroll works */
    overflow-x: auto;     /* ✅ horizontal scroll for member row */
    overflow-y: auto;     /* ✅ vertical scroll now enabled */
  }

  .member-list {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    width: max-content;           /* ✅ ensures all 4 members fit horizontally */
  }

  .member {
    flex: 0 0 auto;
  }

  .member img {
    width: 120px;                 /* slightly larger for tablets */
  }
}


/* === Mobile adjustments for About Page === */
@media (max-width: 700px) {
  .about-layout {
    flex-direction: column;
    padding: 20px; /* tighter for small screens */
  }

  .about-text {
    width: 100%;
  }

  .about-members {
    border-left: none;
    border-top: 1px solid #ccc;
    padding-left: 0;
    padding-top: 20px;
    max-height: none;
    width: 100%;
    overflow-x: auto; /* ✅ allows horizontal scroll */
    overflow-y: hidden;
  }

  .member-list {
    flex-direction: row; /* ✅ horizontal members */
    justify-content: flex-start;
    align-items: flex-start;
    gap: 16px;
    width: max-content; /* ✅ ensures proper scroll */
  }

  .member {
    flex: 0 0 auto;
  }

  .member img {
    width: 100px;
  }

  .member p {
    font-size: 0.85rem;
  }
}


/* === Disable tap highlight globally and for the cat image === */
img, button, a, div {
  -webkit-tap-highlight-color: transparent;
}

#catImage {
  -webkit-tap-highlight-color: transparent;
}

/* === Combo Bonus Text (floats beside centered Local Count) === */
#combo-bonus {
  position: absolute;
  left: 100%;            /* sits right beside the number */
  top: 50%;
  margin-left: 8px;
  transform: translateY(-50%);
  font-family: "Coopers";
  font-size: 22px;
  font-weight: 700;
  color: #4caf50;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#combo-bonus.show {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

/* === Rank Movement Animation === */
.row.rank-up {
  animation: rankUp 0.6s ease-out forwards;
  background: #c8ffce; /* soft light green */
}

.row.rank-down {
  animation: rankDown 0.6s ease-out forwards;
  opacity: 0.6;
}

@keyframes rankUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes rankDown {
  0% { transform: translateY(-10px); opacity: 1; }
  100% { transform: translateY(0.5); opacity: 0.7; }
}
