/* ===== BASE ===== */
html,
body {
  height: 100%;
  margin: 0;
  background: #0f1115;
  color: #fff;
  font-family: "Segoe UI", system-ui, sans-serif;
  overflow: hidden; /* lock page scroll */
}

/* ===== PAGE GRID ===== */
.page {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  height: calc(100vh - 55px); /* minus navbar height */
  overflow: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #14161b;
  color: #fff;
  padding: 10px 25px;
  font-size: 16px;
  height: 55px;
  box-sizing: border-box;
}
.nav-left .brand {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}
.nav-left .brand:hover {
  color: #4db2ff;
}
.nav-right a {
  color: #ccc;
  margin-left: 12px;
  font-size: 18px;
  text-decoration: none;
}
.nav-right a:hover {
  color: #fff;
}


/* === Sponsor Popup Overlay === */
.sponsor-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 12000;
}

.sponsor-overlay.show {
  display: flex;
}

.sponsor-popup {
  position: relative;
  z-index: 12001;
  width: 90%;
  max-width: 480px;
  background: #1b1e24;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
  max-height: 90vh;
  overflow-y: auto;
}

.sponsor-popup h2 {
  margin-top: 0;
  font-size: 24px;
  color: #ff5030;
}

.sponsor-popup .subtitle {
  color: #ccc;
  margin-bottom: 15px;
}

.sponsor-popup h3 {
  color: #f4b23a;
  margin-top: 20px;
  margin-bottom: 6px;
}

.status {
  color: #ff7b00;
}

.offer-box {
  background: #111318;
  padding: 14px;
  border-radius: 8px;
  margin-top: 15px;
}

.cta-btn {
  background: linear-gradient(90deg, #007bff, #00d2ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  margin-top: 20px;
  transition: all 0.25s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(0, 174, 255, 0.7);
}


/* ===== SPONSOR COLUMNS ===== */
.sponsor-column {
  width: 220px;
  height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px 20px;
  position: sticky;
  top: 55px;

  /* 🔧 fixes clipping */
  overflow: visible; /* allow hover shadow and lift fully */
  padding-bottom: 20px; /* so last card isn't cut */
  gap: 10px; /* even spacing between cards */
}

.sponsor-column::-webkit-scrollbar {
  width: 6px;
}
.sponsor-column::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}
.sponsor-card {
  width: 95%;
  min-height: 120px;
  background: #2a2d33;
  border-radius: 15px;
  padding: 18px 14px;
  color: #ddd;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.4s ease, background 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  will-change: transform, box-shadow;
}

.sponsor-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 12px 30px rgba(0, 174, 255, 0.25),
    0 6px 15px rgba(255, 255, 255, 0.05);
  background: #32343d; /* slight tint shift */
}
/* Optional soft glow when hovered */
.sponsor-card:hover::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  background: radial-gradient(
    circle at center,
    rgba(0, 174, 255, 0.2),
    transparent 70%
  );
  z-index: -1;
}

.sponsor-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.sponsor-card b {
  display: block;
  font-size: 16px;
  color: #fff;
  margin-bottom: 6px;
}
.sponsor-card p {
  font-size: 14px;
  line-height: 1.3;
  color: #ccc;
  margin: 0;
}
.sponsor-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}
.sponsor-card:hover .sponsor-logo {
  transform: scale(1.08);
}

/* ===== MAIN AREA ===== */
.main-area {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  overflow: hidden; /* keep page locked */
  padding: 20px 30px;
  box-sizing: border-box;
}

/* ===== TITLE ===== */
.topbar {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.topbar h1 {
  color: #ff5030; /* forensic red accent */
  font-size: 32px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(255, 80, 48, 0.6), 0 0 16px rgba(0, 174, 255, 0.25); /* red-blue hybrid glow */
  animation: glowPulse 3s ease-in-out infinite alternate;
}
/* Stylish underline line */
.topbar h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, #ff5030, #00bfff);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0, 174, 255, 0.5);
}

.topbar .subtitle {
  color: #f2f2f2;
  font-weight: 600;
  font-size: 15px;
  margin-top: 10px;
  text-shadow: 0 0 4px rgba(0, 174, 255, 0.4);
  letter-spacing: 0.3px;
  animation: fadeIn 1s ease-out;
}

/* Smooth glowing animation */
@keyframes glowPulse {
  from {
    text-shadow: 0 0 6px rgba(255, 80, 48, 0.6),
      0 0 16px rgba(0, 174, 255, 0.25);
  }
  to {
    text-shadow: 0 0 10px rgba(255, 80, 48, 0.9),
      0 0 22px rgba(0, 174, 255, 0.6);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SEARCH & FILTER ===== */
.control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto;
  flex-wrap: wrap;
}
.control-bar input {
  background: #1e212a;
  border: 1px solid #333;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  width: 240px;
  transition: border 0.2s ease;
}
.control-bar input:focus {
  outline: none;
  border-color: #007bff;
}
.filter-btn {
  background: #1b62d0;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.filter-btn:hover {
  background: #2976e5;
}
.dropdown {
  position: relative;
  display: inline-block;
}
.filter-menu {
  display: none;
  position: absolute;
  top: 120%;
  left: 0;
  background-color: #1f2229;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  padding: 15px 18px;
  min-width: 210px;
  z-index: 9000; /* ✅ ensure it's above the table */
  animation: fadeIn 0.25s ease-in-out;
  min-width: 160px; /* narrower container */
  padding: 8px 12px;
}

.dropdown.show .filter-menu {
  display: block;
}
/* === Compact 2-column layout for filters === */
/* === Compact 2-column layout (fixed alignment) === */
.filter-section {
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.filter-section h4 {
  color: #f4b23a;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Use grid only for labels */
.filter-section .options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px; /* compact horizontal and vertical gaps */
}

.filter-section label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-section label:hover {
  color: #fff;
}

.filter-section input[type="checkbox"] {
  transform: scale(1.05);
  accent-color: #f4b23a;
}

/* ===== STATS ===== */
.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.stats span {
  background: #1c1e22;
  border-radius: 8px;
  padding: 4px 10px;
  margin: 5px;
  color: #00d26a;
  font-size: 13px;
}

/* ===== TABLE ===== */
.table-wrapper {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 320px); /* show ~10 rows before scroll */
  margin-top: 10px;
  border-radius: 8px;
  scrollbar-width: thin;
  scrollbar-color: #4db2ff #1e1f22;
}

.table-wrapper::-webkit-scrollbar {
  width: 6px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: #4db2ff;
  border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-track {
  background: #1e1f22;
}
.table-wrapper {
  position: relative;
  z-index: 1; /* ensure table stays under dropdown */
}

table {
  width: 90%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 700px;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto;
}

th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #1f2125;
}
th {
  color: #aaa;
  background: #14161b;
  position: sticky;
  top: 0;
  z-index: 10;
}
tr:hover {
  background: #181b23;
}
td a {
  color: #f9c74f;
  text-decoration: none;
}
td a:hover {
  text-decoration: underline;
}
/* ✅ Wrap only when text exceeds ~40 characters */
td {
  white-space: normal; /* allow wrapping */
  overflow-wrap: break-word; /* wrap only when necessary */
  word-break: keep-all; /* prevent mid-word breaking */
  max-width: 32ch; /* ~32 characters before wrapping */
  overflow-wrap: anywhere;     /* handle unbreakable strings */
}

#scenarioText {
  white-space: pre-wrap;      /* preserve \n line breaks */
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
  font-size: 14px;
  margin: 0; /* removes default top and bottom margin */
  padding-top: 2px; /* small breathing room under the × */
  padding-bottom: 2px; /* small breathing room above the end */

}
.scenario-content p:first-child {
  margin-top: 0;
}



/* Zebra striping for better readability */
table tr:nth-child(even) {
  background-color: #14161b; /* subtle darker shade for even rows */
}

table tr:nth-child(odd) {
  background-color: #101216; /* slightly lighter shade for odd rows */
}

/* Optional: highlight on hover for extra clarity */
table tr:hover {
  background-color: #1c1f26;
}


.eye-icon,
.scenario-icon {
  cursor: pointer;
  color: #f9c74f;
  margin-left: 6px;
  font-size: 16px;
  transition: 0.2s;
}
.eye-icon:hover,
.scenario-icon:hover {
  color: #fff;
}

/* ===== SCENARIO BOX ===== */
.scenario-inline {
  display: none;
  position: fixed; /* fixed instead of absolute */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* center on screen */
  background: #1b1e24;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 174, 255, 0.3);
  z-index: 2000;

  max-width: 600px;
  width: 90%;
  max-height: 75vh; /* ensure visible */
  overflow-y: auto;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  padding: 20px 24px;
  box-sizing: border-box;
  animation: fadeIn 0.25s ease-out;
}

/* Content area */
.scenario-content {
  position: relative;
  white-space: pre-wrap;
  word-break: break-all;
}


/* Close button */
#closeScenario {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 18px;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s;
}
#closeScenario:hover {
  color: #fff;
}



/* Scrollbar style for WebKit browsers */
.scenario-inline::-webkit-scrollbar {
  width: 6px;
}
.scenario-inline::-webkit-scrollbar-thumb {
  background: #4db2ff;
  border-radius: 3px;
}


.scenario-inline.show {
  display: block;
}

/* ===== SUBMIT BUTTON (BLUE GLOW) ===== */
.submit-section {
  text-align: center;
  margin: 30px 0 80px;
}
.submit-section button {
  background: linear-gradient(90deg, #007bff, #00d2ff);
  border: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px rgba(0, 174, 255, 0.5);
}
.submit-section button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(0, 174, 255, 0.8);
}

/* ===== FOOTER ===== */
footer.footer {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #aaa;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
  z-index: 999;
  pointer-events: auto; /* ✅ allows clicks */
}

.footer-link {
  color: #4db2ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===== POPUP ===== */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.popup-overlay.show {
  display: flex;
}
.popup {
  background: #1c1e25;
  padding: 20px;
  border-radius: 12px;
  width: 320px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}
.popup input,
.popup textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  background: #252931;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
}
.popup button {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.popup button:hover {
  background: #2990ff;
}
.close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 18px;
  cursor: pointer;
  color: #bbb;
}
.close-btn:hover {
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .page {
    grid-template-columns: 180px 1fr;
  }
  #rightSponsors {
    display: none;
  }
}
/* ===== OLD WORKING HASH STYLE (GLOBAL) ===== */
.hidden-hash {
  display: none;
  margin-left: 6px;
  color: #00d26a;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.hidden-hash.show {
  display: inline;
}

.eye-icon {
  cursor: pointer;
  color: #f9c74f;
  margin-left: 6px;
  font-size: 16px;
  transition: 0.2s;
}

.eye-icon:hover {
  color: #fff;
}



.hash-tooltip-wrapper {
  position: relative;
  display: inline-block;
}

/* Tooltip bubble */
.hash-tooltip {
  position: absolute;
  bottom: 125%;              /* show above the icon */
  left: 50%;
  transform: translateX(-50%);
  background-color: #000 ; /* your rectangle background rgba(0, 0, 0, 0.6) */
  color: #00d26a;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.85rem;          
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  opacity: 0;                /* hidden by default */
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

/* Small arrow under the tooltip */
.hash-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

/* Show tooltip on hover */
.hash-tooltip-wrapper:hover .hash-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}




@media (max-width: 768px) {
  .page {
    grid-template-columns: 1fr;
  }
  #leftSponsors,
  #rightSponsors {
    display: none;
  }
  .main-area {
    padding: 15px 10px 140px;
  }
  table {
    font-size: 14px;
    min-width: 600px;
  }
}
.brand {
  display: flex;
  align-items: center; /* perfectly vertical center */
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.brand-logo {
  width: 32px; /* small and consistent size */
  height: 32px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-top: 1px; /* subtle nudge for optical centering */
  filter: invert(1) brightness(2) drop-shadow(0 0 4px rgba(0, 174, 255, 0.6)); /* white-blue touch */
  transition: transform 0.25s ease, filter 0.25s ease;
}

.brand-logo:hover {
  transform: scale(1.1);
  filter: invert(1) brightness(3) drop-shadow(0 0 10px rgba(0, 174, 255, 0.9))
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)); /* cool glowing blend */
}

/* Neon animated border around search box */
#searchInput {
  background: #1e212a;
  border-radius: 14px;
  color: #fff;
  padding: 12px 16px;
  font-size: 15px;
  width: 260px;
  outline: none;
  border: 2px solid transparent;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
}

/* Animated rounded neon border */
#searchInput:before,
#searchInput:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(120deg, #ffffff, #00bfff, #007bff, #ffffff);
  background-size: 300% 300%;
  animation: moveGlow 3s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

@keyframes moveGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

#searchInput::placeholder {
  color: #aaa;
  transition: color 0.3s ease;
}

#searchInput:focus::placeholder {
  color: #fff;
}
.sponsor-note {
  text-align: center;
  font-size: 13px;
  color: #bbb;
  margin-top: 8px;
  opacity: 0.8;
  pointer-events: auto;
}

.sponsor-note a {
  color: #4db2ff;
  text-decoration: none;
}

.sponsor-note a:hover {
  text-decoration: underline;
  color: #fff;
}
.custom-alert {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1c1e25;
  color: #fff;
  border-radius: 12px;
  padding: 20px 30px;
  box-shadow: 0 0 15px rgba(0, 174, 255, 0.5);
  z-index: 3000;
  text-align: center;
  min-width: 260px;
  animation: alertFadeIn 0.3s ease; /* ✅ use unique name */
}
.custom-alert button {
  background: linear-gradient(90deg, #007bff, #00d2ff);
  border: none;
  border-radius: 6px;
  color: white;
  padding: 6px 16px;
  margin-top: 10px;
  cursor: pointer;
  transition: 0.3s;
}
.custom-alert button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(0, 174, 255, 0.7);
}
@keyframes alertFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

#advertisePopupOverlay.sponsor-overlay { 
  display: none !important;
  position: fixed !important; inset: 0 !important;
  background: rgba(0,0,0,.6) !important;
  justify-content: center !important; align-items: center !important;
  z-index: 2147483000 !important; /* above everything */
}
#advertisePopupOverlay.sponsor-overlay.show { display: flex !important; }
#advertisePopupOverlay .sponsor-popup {
  position: relative; z-index: 2147483001;
  opacity: 1; transform: none; /* avoid “dim only” cases */
}




/* ===== 📱 MOBILE OPTIMIZATION ===== */
@media (max-width: 768px) {
 html, body {
    overflow-y: auto; /* allow vertical scroll for small screens */
  }

  .page {
    grid-template-columns: 1fr; /* single column layout */
    height: auto;
  }

  #leftSponsors,
  #rightSponsors {
    display: none; /* hide sponsor columns */
  }

  .main-area {
    padding: 10px 15px 80px;
    align-items: stretch;
  }

  .topbar h1 {
    font-size: 26px;
    margin-top: 10px;
  }

  .topbar .subtitle {
    font-size: 14px;
    text-align: center;
    margin-top: 6px;
  }

  .control-bar {
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
  }

  #searchInput {
    width: 100%;
    font-size: 14px;
  }

  .filter-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }

  .stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
  }

  .stats span {
    padding: 6px 10px;
  }

  .table-wrapper {
    overflow-x: auto;
    max-height: 65vh;
  }

  table {
    min-width: 600px;
    font-size: 14px;
  }

  .submit-section {
    margin-top: 30px;
  }

  .submit-section button {
    width: 100%;
    font-size: 15px;
  }

  .sponsor-note {
    font-size: 12px;
    margin-top: 10px;
  }

  footer.footer {
    font-size: 12px;
    bottom: 5px;
    line-height: 1.3;
  }

  .footer-link {
    display: inline-block;
    margin-top: 3px;
  }
}



