:root { 
  --bg: #0d0e15; 
  --card-bg: #151821; 
  --border: #2a3042; 
  --accent: #00ffcc; 
  --lime-green: #39ff14;
  --ghost-purple: #9d4edd; 
  --royal-purple: #5a189a; 
  --candy-red: #ff003c; 
  --active-red: #ff003c; 
  --active-green: #39ff14; 
  --text: #f7f7f7; 
  --subtext: #a0aab8; 
  --yellow: #ffcc00;
  --shake-duration: 0.05s;
} 

* { 
  box-sizing: border-box; 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
  -webkit-font-smoothing: antialiased;
} 

body { 
  background-color: var(--bg); 
  color: var(--text); 
  margin: 0; 
  padding: 6px; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  position: relative; 
  overflow-x: hidden;
} 

/* SCREEN CRACK & TV SCANLINE OVERLAY EFFECT */
.crack-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 3px, 6px 100%;
  opacity: 0.85;
}

.app-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 4px solid var(--lime-green);
  padding: 6px;
  border-radius: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

@keyframes instantShake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 3px); }
  40% { transform: translate(4px, -3px); }
  60% { transform: translate(-3px, -2px); }
  80% { transform: translate(3px, 2px); }
  100% { transform: translate(0, 0); }
}

.app-container.shake-effect {
  animation: instantShake var(--shake-duration) ease-in-out 1;
}

@keyframes intenseFlash {
  0% { border-color: var(--lime-green); box-shadow: 0 0 10px var(--lime-green); }
  50% { border-color: var(--ghost-purple); box-shadow: 0 0 25px var(--ghost-purple); }
  100% { border-color: var(--candy-red); box-shadow: 0 0 20px var(--candy-red); }
}

.app-container.flashing {
  animation: intenseFlash 0.3s infinite alternate;
}

header { 
  text-align: center; 
  margin-bottom: 6px; 
  border-bottom: 3px double var(--lime-green); 
  padding-bottom: 4px; 
  width: 100%; 
} 

h1 { 
  font-size: 1.1rem; 
  font-weight: 900; 
  color: var(--lime-green); 
  margin: 0; 
  text-transform: uppercase; 
  letter-spacing: 0.5px; 
  text-shadow: 0 0 5px var(--lime-green);
} 

.btn { 
  font-weight: 800; 
  font-size: 0.7rem; 
  background: var(--lime-green); 
  color: #0d0e15; 
  border: 1px solid #ffffff; 
  padding: 6px 10px; 
  cursor: pointer; 
  border-radius: 6px; 
  text-transform: uppercase; 
  transition: transform 0.1s; 
  text-decoration: none;
  display: inline-block;
} 

.btn:active { 
  transform: scale(0.95); 
} 

.btn-danger { 
  background: var(--candy-red); 
  color: #fff; 
} 

.btn-cyan { 
  background: var(--accent); 
  color: #0d0e15; 
} 

.btn-medium {
  font-size: 0.82rem;
  padding: 8px 16px;
  font-weight: 900;
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

.response-banner { 
  width: 100%; 
  background: #1a1e2e; 
  border: 2px solid var(--lime-green); 
  border-radius: 6px; 
  padding: 6px 10px; 
  margin-bottom: 6px; 
  display: none; 
  align-items: center; 
  gap: 8px; 
} 

.response-banner.show { 
  display: flex; 
  animation: fadeIn 0.2s ease-in; 
} 

@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(-4px); } 
  to { opacity: 1; transform: translateY(0); } 
} 

.meters-wrapper { 
  width: 100%; 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
  margin-bottom: 6px; 
} 

.meter-card { 
  background: var(--card-bg); 
  border: 1px solid var(--border); 
  padding: 6px 10px; 
  border-radius: 6px; 
  width: 100%; 
  text-align: center; 
} 

.meter-header { 
  display: flex; 
  justify-content: space-between; 
  font-size: 0.68rem; 
  font-weight: 800; 
  margin-bottom: 4px; 
} 

.meter-bg { 
  background: #090a0f; 
  height: 14px; 
  border-radius: 8px; 
  border: 1px solid var(--border); 
  overflow: hidden; 
  position: relative; 
} 

.meter-fill { 
  height: 100%; 
  width: 0%; 
  background: linear-gradient(90deg, var(--lime-green) 0%, var(--candy-red) 100%); 
  transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
} 

.optics-fill { 
  height: 100%; 
  width: 0%; 
  background: linear-gradient(90deg, #39ff14 0%, #9d4edd 50%, #ff003c 100%); 
  transition: width 0.3s ease-out; 
} 

.meter-status { 
  font-size: 0.68rem; 
  font-weight: 800; 
  margin-top: 3px; 
  color: var(--subtext); 
} 

.docket-card { 
  background: var(--card-bg); 
  border: 1px solid var(--accent); 
  padding: 8px 10px; 
  border-radius: 6px; 
  width: 100%; 
  margin-bottom: 6px; 
} 

.docket-header { 
  color: var(--lime-green); 
  font-size: 0.75rem; 
  font-weight: 900; 
  text-transform: uppercase; 
  margin-bottom: 4px; 
  display: flex;
  justify-content: space-between;
  align-items: center;
} 

.zoomer-type-badge {
  font-size: 0.62rem;
  background: var(--lime-green);
  color: #0d0e15;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.docket-stats { 
  display: flex; 
  justify-content: space-between; 
  font-weight: 800; 
  font-size: 0.72rem; 
  margin-bottom: 4px;
} 

.docket-stats span { 
  color: var(--accent); 
} 

.zoomer-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #090a0f;
  padding: 4px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.58rem;
  text-align: center;
}

.stat-box {
  display: flex;
  flex-direction: column;
}

.stat-title {
  color: var(--subtext);
  font-size: 0.52rem;
  text-transform: uppercase;
}

.stat-val {
  color: var(--lime-green);
  font-weight: 900;
}

/* BINGO GRID & INTEGRATED TRUE/FALSE TILE LAYOUT */
.bingo-grid { 
  display: grid; 
  grid-template-columns: repeat(5, 1fr); 
  gap: 4px; 
  width: 100%; 
  aspect-ratio: 1; 
  margin-bottom: 6px; 
} 

.cell { 
  background: var(--card-bg); 
  border: 1px solid var(--border); 
  font-size: 0.55rem; 
  font-weight: 700; 
  line-height: 1.1; 
  color: #ffffff; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: space-between; 
  text-align: center; 
  padding: 4px 2px; 
  cursor: default; 
  user-select: none; 
  border-radius: 4px; 
  word-wrap: break-word; 
  position: relative; 
  transition: all 0.15s ease-in-out;
  box-shadow: 0 3px 0 #090a0f;
} 

/* RANDOM SCREENSAVER TILE LIGHTING CLASS */
.cell.screensaver-glow {
  box-shadow: 0 0 12px var(--lime-green);
  border-color: var(--lime-green) !important;
  background: rgba(57, 255, 20, 0.25) !important;
}

.cell .content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.cell .icon { 
  font-size: 0.8rem; 
  margin-bottom: 2px; 
} 

.tf-controls {
  display: flex;
  width: 100%;
  gap: 2px;
  margin-top: 3px;
}

.tf-btn {
  flex: 1;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 3px 0;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  color: #000;
  text-transform: uppercase;
  box-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

.tf-btn:active {
  transform: translateY(1px);
}

.tf-btn-t { background: var(--lime-green); }
.tf-btn-f { background: var(--candy-red); color: #fff; }

.cell.evaluated-correct { 
  background: rgba(57, 255, 20, 0.2) !important; 
  border: 2px solid var(--lime-green) !important; 
  color: var(--lime-green) !important; 
} 

.cell.evaluated-wrong { 
  background: rgba(255, 0, 60, 0.2) !important; 
  border: 2px solid var(--candy-red) !important; 
  color: var(--candy-red) !important; 
} 

.cell.free-space {
  background: rgba(0, 255, 204, 0.15);
  border: 2px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
}

.cell.free-space.evaluated-correct {
  background: rgba(57, 255, 20, 0.2) !important;
  border: 2px solid var(--lime-green) !important;
  color: var(--lime-green) !important;
}

.quiz-card { 
  background: var(--card-bg); 
  border: 1px solid var(--border); 
  padding: 8px; 
  border-radius: 6px; 
  width: 100%; 
  margin-bottom: 6px; 
} 

.quiz-card-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 4px; 
} 

.quiz-card h3 { 
  color: var(--lime-green); 
  margin: 0; 
  font-size: 0.82rem; 
  font-weight: 800; 
} 

.quiz-score { 
  font-size: 0.7rem; 
  font-weight: 800; 
  color: var(--accent); 
} 

.quiz-options { 
  display: flex; 
  gap: 6px; 
  margin: 6px 0 0 0; 
} 

.quiz-options button {
  flex: 1;
  font-size: 0.65rem;
  padding: 8px 4px;
}

.feedback { 
  font-size: 0.72rem; 
  font-weight: 700; 
  margin-top: 6px; 
  padding: 6px; 
  border-radius: 4px; 
  display: none; 
} 

.feedback.correct { 
  background: rgba(57, 255, 20, 0.2); 
  border: 1px solid var(--lime-green); 
  color: var(--lime-green); 
} 

.feedback.wrong { 
  background: rgba(255, 0, 60, 0.2); 
  border: 1px solid var(--candy-red); 
  color: var(--candy-red); 
} 

.bottom-card { 
  background: var(--card-bg); 
  border: 1px solid var(--accent); 
  padding: 10px; 
  border-radius: 6px; 
  width: 100%; 
  margin-bottom: 8px; 
  text-align: center; 
} 

.bottom-card h3 { 
  color: var(--lime-green); 
  margin: 0 0 4px 0; 
  font-size: 0.85rem; 
  font-weight: 900; 
  text-transform: uppercase; 
} 

.bottom-card p { 
  font-size: 0.72rem; 
  color: var(--subtext); 
  margin: 0 0 8px 0; 
  line-height: 1.3; 
} 

.bottom-buttons { 
  display: flex; 
  justify-content: center; 
  gap: 6px; 
  flex-wrap: wrap; 
} 

.compact-footer-bar { 
  width: 100%; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 6px; 
  background: #090a0f; 
  border: 1px solid var(--border); 
  padding: 6px 10px; 
  border-radius: 6px; 
  margin-bottom: 12px; 
} 

.footer-links-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.paypal-small-link {
  font-size: 0.65rem;
  color: #0070ba;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.mini-badge { 
  display: flex; 
  align-items: center; 
  gap: 4px; 
  font-size: 0.65rem; 
  font-weight: 800; 
  color: var(--subtext); 
} 

.mini-action-btn { 
  background: var(--card-bg); 
  border: 1px solid var(--border); 
  color: #fff; 
  font-size: 0.65rem; 
  font-weight: 800; 
  padding: 4px 8px; 
  border-radius: 4px; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  gap: 4px; 
  transition: all 0.2s; 
} 

/* MODAL SYSTEM */
.modal { 
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0,0,0,0.92); 
  justify-content: center; 
  align-items: center; 
  z-index: 1000; 
} 

.modal-content { 
  background: var(--card-bg); 
  border: 3px solid var(--lime-green); 
  padding: 16px; 
  text-align: center; 
  border-radius: 8px; 
  max-width: 440px; 
  width: 92%; 
  max-height: 88vh; 
  overflow-y: auto; 
} 

.modal-hero-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid var(--lime-green);
  margin: 8px 0;
  box-shadow: 0 0 15px var(--lime-green);
  display: block;
}

.win-modal-subtitle {
  color: var(--lime-green);
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 0 10px 0;
  border-bottom: 1px dashed var(--accent);
  padding-bottom: 4px;
}

.win-stats-box {
  background: #090a0f;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0 12px 0;
  text-align: left;
}

.win-stats-box h4 {
  margin: 0 0 6px 0;
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 4px;
}

.win-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.win-stat-label {
  color: var(--subtext);
}

.win-stat-val {
  color: var(--lime-green);
}

.rules-list { 
  text-align: left; 
  font-size: 0.75rem; 
  color: var(--text); 
  line-height: 1.4; 
  padding-left: 18px; 
  margin: 10px 0; 
} 

.suggestion-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  text-align: left;
}

.suggestion-form label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
}

.suggestion-form input, 
.suggestion-form textarea {
  background: #090a0f;
  border: 1px solid var(--border);
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.crypto-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.crypto-qr-card {
  background: #090a0f;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.crypto-qr-card img {
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: 4px;
  background: #fff;
  padding: 4px;
}

.crypto-header-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.crypto-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent);
}

.crypto-address {
  font-family: monospace;
  font-size: 0.55rem;
  background: #151821;
  color: var(--lime-green);
  padding: 4px;
  border-radius: 4px;
  word-break: break-all;
  width: 100%;
  text-align: center;
  cursor: pointer;
  border: 1px dashed var(--border);
}

footer { 
  width: 100%; 
  text-align: center; 
  font-size: 0.65rem; 
  color: var(--subtext); 
  margin: 4px auto 20px auto; 
}
