/* ================================================
   Card Style TB
   ================================================ */

:root {
  --bg-body: #000;
  --text-light: #fffaf0;
  --accent-cyan: #58a6ff;
  --accent-yellow: #ffba00;
  --accent-pink: #ff99ff;
  --accent-green: #adefab;
  --border-light: #fffaf0;
  --nav-bg: #111111;
  --card-bg: #111111;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

@font-face {
  font-family: Sans;
  src: url(fonts/OpenSans-SemiBold.ttf) format("truetype");
}

@font-face {
  font-family: Monique;
  src: url(fonts/MoniqueScript-Regular.otf) format("opentype");
  font-display: fallback;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-body);
  background-image: url("media/papyrus-dark.webp");
  background-repeat: repeat;
  color: var(--text-light);
  font-family: "Sans", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.2;
  margin: 0 0 280px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  min-height: 100vh;
}

/* ==================== LINKS ==================== */
a:link,
a:visited {
  text-decoration: none;
  color: var(--accent-cyan);
}
a:hover {
  text-decoration: underline;
  color: var(--accent-yellow);
}

hr {
  color: var(--border-light);
  background-color: var(--border-light);
  margin: 0 auto;
  height: 1px;
}

/* ==================== NAV BAR ==================== */
#nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  background-color: var(--nav-bg);
  width: 100%;
}
#nav li {
  flex: 1 1 auto;
  min-width: 120px;
}
#nav li a {
  display: block;
  padding: 1rem;
  text-align: center;
  color: var(--text-light);
  transition: background-color 0.3s ease, color 0.3s ease;
}
#nav a:hover {
  background-color: #654321;
  color: var(--text-light);
}

/* ==================== BANNER & HEADER ==================== */
#banner {
  background-image: url("media/flowers.webp");
  top: 0;
  left: 0;  
  background-repeat: repeat-x;
  background-position: center;
  width: 100%;
  min-height: 6rem;
  background-size: auto 100%;
}

#logo {
  max-height: 7.5rem;
  width: auto;
  display: block;
  margin: 0 auto;
}

header {
  font-family: "Monique", Helvetica, Arial, sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  text-align: center;
  color: var(--accent-green);
  margin: 0.5rem 0 0.2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.loading-overlay {
  width: 40%;
  justify-content: center;
  color: var(--accent-cyan);
  text-align: center;
  margin: auto;
  height: 4.8px;
  display: inline-block;
  position: relative;
  overflow: hidden;
}
.loading-overlay::after {
  justify-content: center; 
  text-align: center;
  margin: auto;   
  content: '';  
  width: 96px;
  height: 4.8px;
  background: var(--accent-cyan);
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  animation: hitZak 0.6s ease-in-out infinite alternate;
}

@keyframes hitZak {
  0% {
    left: 0;
    transform: translateX(-1%);
  }
  100% {
    left: 100%;
    transform: translateX(-99%);
  }
}
    

/* HTML: <div class="loader"></div> 
.loading-overlay {
  font-weight: bold;
  font-family: monospace;
  font-size: 30px;
  display: inline-grid;
  overflow: hidden;
  margin: auto;
}
.loading-overlay:before,
.loading-overlay:after {
  text-align: center;
  content: "Loading...";
  grid-area: 1/1;
  clip-path: inset(0 -200% 50%);
  text-shadow: -10ch 0 0;
  animation: l13 2s infinite;
}
.loading-overlay:after {
  clip-path: inset(50% -200% 0%);
  text-shadow: 10ch 0 0;
  --s:-1;
  animation-delay: 1s;
}
@keyframes l13 {25%,100%{transform: translateX(calc(var(--s,1)*100%));}}
*/

/* ==================== SEARCH BAR ==================== */
#myInput {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0.5rem;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 0.5rem;
}

#myInput table {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
  width: 100%;
  font-size: 1rem;
}

#myInput td {
  padding: 0.5rem 1rem;
  width: auto;
  min-width: 15.1rem;
}

#myInput select,
#myInput input {
  width: 100%;
  background-color: #111;
  color: #fff;
  border: 2px solid #444;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  transition: border-color 0.3s;
}
#myInput select:focus,
#myInput input:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

#stuff {  
  width: 80%;
  margin: 0 auto;
}

#myInput .button-85 {
  justify-content: center;  
  padding: 0.6em 2em;
  border: none;
  outline: none;
  color: rgb(255, 255, 255);
  background: #111;
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.button-85:before {
  content: "";
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  -webkit-filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing-button-85 20s linear infinite;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

@keyframes glowing-button-85 {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.button-85:after {
  z-index: -1;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #222;
  left: 0;
  top: 0;
  border-radius: 10px;
  transition: all 0.8s;
}

/* ==================== TOTALS ==================== */
#tots {
  text-align: center;
  color: var(--accent-pink);
  font-size: 1.20rem;
  margin: 1rem;
}

/* ==================== MAIN RESULTS - CARD GRID ==================== */
#myTable {
  width: 95%;
  max-width: 1800px;
  margin: 0 auto 1rem;
  text-align: center;  
  justify-content: center;
  align-items: center;  
  background-color: rgba(0, 0, 0, 0.5);
}

#myTable table {
  width: 100%;
  border: none;
  background: transparent; 
}

#myTable thead {
  display: none;
}

#myTable tbody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
  justify-content: center;
  align-items: center;    
  padding: 0.3rem;
}

#myTable tr {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  align-items: center;
  max-width: 300px;         /* Border color taken from column 3 (yellow links) */
  border-radius: 0.8rem;
  padding: 0.3rem;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#myTable tr:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5);
}

#myTable tr::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
/*  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green)); */
}

/* Card cell styling */
#myTable td {
  border: none;
  padding: 0;
  margin: 0;
  font-size: 1rem;
  width: 100%;
  text-align: center;
  padding: 0.4rem;
  line-height: 1.2;  
}

/* Column 1 - Small info / ID */
#myTable td:first-child {
  font-size: 1.1rem;
  font-weight: 700;
  padding-bottom: 1rem;
}

/*#myTable td:nth-child(2)::before {
   line-height: 1.0; 
   vertical-align: middle;
   min-height: 100px;
}
*/
/* Column 3 - Description (now appears BEFORE title) */
#myTable td:nth-child(2) {
  font-size: 1rem;
  flex: 1;
  font-weight: 500;
  border-top: 2px solid rgba(255, 250, 240, 0.2);
}

/* Column 2 - Main Title (now appears AFTER description) */
#myTable td:nth-child(3) {
  font-size: 1rem;
  border-top: 1px dotted rgba(255, 250, 240, 0.2);
}

#myTable td:nth-child(4) {
  font-size: 1.4rem;
  font-weight: 700;
  border-top: 1px dotted rgba(255, 250, 240, 0.2);
}

/* Column 4 & 5 - Meta info */
#myTable td:nth-child(5) {
  font-weight: 500;
  font-size: 1rem;
  border-top: 1px dotted rgba(255, 250, 240, 0.2);
}

#myTable td:last-child {
  font-size: 1rem;
  border-top: 1px dotted rgba(255, 250, 240, 0.2);
}

/* ==================== PAGING ==================== */
#paging {
  max-width: 800px;
  margin: auto;
  text-align: center;
  font-size: 1.25rem;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 0.5rem;  
}
#paging a:link,
#paging a:visited {
  color: var(--accent-pink);
  padding: 2px;
  margin: 0 4px;
  transition: all 0.3s;
}
#paging a:hover {
  background-color: var(--card-bg);
  color: var(--accent-cyan);
}

/* ==================== COMMUNITY IMAGES ==================== */
#ComImg img {
  max-width: 100%;
  max-height: 220px;
  border: 2px solid blanchedalmond;
  border-radius: 1rem;
  transition: transform 0.3s ease;
}
#ComImg img:hover {
  transform: scale(1.05);
}

#community {
  text-align: center;
  margin: 3rem 0 2rem;
}

/* ==================== INFO SECTION ==================== */
#info {
  max-width: 1400px;
  width: 92%;
  margin: 3rem auto;
  font-size: 1.15rem;
  line-height: 1.5;
  white-space: pre-wrap;
  text-align: left;
}

/* ==================== FOOTER ==================== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--nav-bg);
  border-top: 1px solid var(--border-light);
  color: var(--text-light);
  font-size: 0.95rem;
  padding: 0.5rem 0;
  text-align: center;
  height: auto;
  min-height: 68px;
  z-index: 100;
}
small {
  font-size: 0.75rem;
  display: block;
  margin-top: 0.1rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  #myTable tbody {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  #myTable tr { padding: 1rem; }
}

@media (max-width: 480px) {
  #myTable tbody {
    grid-template-columns: 1fr;
  }
  #nav li { flex: 1 1 48%; }
  #nav li a { padding: 0.8rem 0.5rem; font-size: 1rem; }
}

@media (max-width: 1024px) {
  header { margin-top: 1rem; }
}