@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg-dark: #1a1a2e;
  --bg-darker: #0f0f1a;
  --bg-panel: #16213e;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b8;
  --accent: #e94560;
  --accent-glow: #ff6b81;
  --accent-secondary: #f0c040;
  --border-color: #e0e0e0;
  --border-dim: #3a3a5c;
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'Press Start 2P', 'Courier New', monospace;
  --transition-fast: 0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font-body);
  background-color: var(--bg-darker);
  color: var(--text-primary);
  min-height: 100%;
}

img { display: block; max-width: 100%; height: auto; }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  background-color: var(--bg-panel);
  border-bottom: 3px solid var(--accent);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.site-title {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-shadow: 2px 2px 0 rgba(233, 69, 96, 0.3);
  user-select: none;
}

.site-title-link {
  text-decoration: none;
}

.header-tagline {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-60%);
}

.phase-label {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.header-dot {
  color: var(--border-dim);
  font-size: 0.6rem;
}

.trial-timer {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.warning-counter {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  color: var(--accent);
}

#start-trial-btn {
  display: none;
}

.header-x-link {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
}

.header-x-link:hover {
  color: var(--accent);
}

.header-x-icon {
  display: block;
}

/* === LANDING SECTION === */
.landing-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 48px 24px;
  position: relative;
  overflow: hidden;
}

/* Pixel bubbles */
.bubbles-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubbles-bg-dapp {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -20px;
  background: rgba(233, 69, 96, 0.12);
  border: 2px solid rgba(233, 69, 96, 0.2);
  border-radius: 0;
  animation: bubble-rise linear infinite;
}

.b1  { left: 5%;  width: 6px;  height: 6px;  animation-duration: 14s; animation-delay: -7s; }
.b2  { left: 15%; width: 4px;  height: 4px;  animation-duration: 18s; animation-delay: -12s; background: rgba(240, 192, 64, 0.1); border-color: rgba(240, 192, 64, 0.18); }
.b3  { left: 28%; width: 8px;  height: 8px;  animation-duration: 12s; animation-delay: -3s; }
.b4  { left: 40%; width: 4px;  height: 4px;  animation-duration: 20s; animation-delay: -15s; background: rgba(240, 192, 64, 0.1); border-color: rgba(240, 192, 64, 0.18); }
.b5  { left: 52%; width: 6px;  height: 6px;  animation-duration: 16s; animation-delay: -9s; }
.b6  { left: 65%; width: 10px; height: 10px; animation-duration: 22s; animation-delay: -18s; background: rgba(240, 192, 64, 0.08); border-color: rgba(240, 192, 64, 0.15); }
.b7  { left: 75%; width: 4px;  height: 4px;  animation-duration: 15s; animation-delay: -5s; }
.b8  { left: 85%; width: 6px;  height: 6px;  animation-duration: 19s; animation-delay: -14s; background: rgba(240, 192, 64, 0.1); border-color: rgba(240, 192, 64, 0.18); }
.b9  { left: 92%; width: 8px;  height: 8px;  animation-duration: 13s; animation-delay: -8s; }
.b10 { left: 35%; width: 4px;  height: 4px;  animation-duration: 17s; animation-delay: -11s; }
.b11 { left: 58%; width: 6px;  height: 6px;  animation-duration: 21s; animation-delay: -16s; background: rgba(240, 192, 64, 0.08); border-color: rgba(240, 192, 64, 0.15); }
.b12 { left: 10%; width: 8px;  height: 8px;  animation-duration: 16s; animation-delay: -2s; }
.b13 { left: 22%; width: 5px;  height: 5px;  animation-duration: 19s; animation-delay: -10s; background: rgba(240, 192, 64, 0.1); border-color: rgba(240, 192, 64, 0.18); }
.b14 { left: 47%; width: 7px;  height: 7px;  animation-duration: 14s; animation-delay: -6s; }
.b15 { left: 70%; width: 5px;  height: 5px;  animation-duration: 21s; animation-delay: -17s; background: rgba(240, 192, 64, 0.08); border-color: rgba(240, 192, 64, 0.15); }
.b16 { left: 88%; width: 4px;  height: 4px;  animation-duration: 17s; animation-delay: -4s; }
.b17 { left: 3%;  width: 10px; height: 10px; animation-duration: 24s; animation-delay: -20s; background: rgba(240, 192, 64, 0.06); border-color: rgba(240, 192, 64, 0.12); }
.b18 { left: 33%; width: 6px;  height: 6px;  animation-duration: 15s; animation-delay: -13s; }
.b19 { left: 62%; width: 4px;  height: 4px;  animation-duration: 20s; animation-delay: -8s; background: rgba(240, 192, 64, 0.1); border-color: rgba(240, 192, 64, 0.18); }
.b20 { left: 80%; width: 8px;  height: 8px;  animation-duration: 13s; animation-delay: -1s; }

@keyframes bubble-rise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(calc(-100vh - 40px)) translateX(20px);
    opacity: 0;
  }
}

.landing-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.landing-hero-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  image-rendering: auto;
  animation: landing-breathe 2s steps(2) infinite;
}

@keyframes landing-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.landing-title {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-shadow: 2px 2px 0 rgba(233, 69, 96, 0.3);
}

.landing-desc {
  font-size: 0.55rem;
  color: var(--text-secondary);
  line-height: 2.4;
}

.landing-desc-sub {
  font-size: 0.4rem;
  color: var(--border-dim);
  font-style: italic;
}

.enter-court-btn {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  padding: 14px 40px;
  background-color: var(--accent);
  color: var(--bg-darker);
  border: 3px solid var(--accent);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

.enter-court-btn:hover {
  background-color: var(--accent-glow);
  border-color: var(--accent-glow);
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

/* === COURT APP (hidden until enter) === */
.court-app { width: 100%; }

/* === PAGE CONTENT — scrollable === */
.page-content {
  width: 100%;
}

/* === DAPP LAYOUT — sidebar + court === */
.dapp-layout {
  display: flex;
  min-height: calc(100vh - 51px);
}

/* === SIDEBAR === */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  background-color: var(--bg-panel);
  border-right: 3px solid var(--border-dim);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: sticky;
  top: 51px;
  height: calc(100vh - 51px);
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar-section {
  padding: 14px;
  border-bottom: 2px solid var(--border-dim);
}

.sidebar-section:last-child { border-bottom: none; }

.sidebar-title {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

/* === COURT MAIN === */
.court-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 51px);
}

/* === COURT SECTION — windowed === */
.court-section {
  padding: 24px;
  display: flex;
  justify-content: center;
}

.court-window {
  width: 100%;
  flex: 1;
  border: 4px solid var(--accent);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(233, 69, 96, 0.15), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.court-window-inner {
  display: flex;
  height: 100%;
}

.courtroom-container {
  position: relative;
  flex: 1;
  background-color: var(--bg-dark);
  background-image: url('roles/зал с крабами1.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.courtroom-container.court-switching {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.courtroom-container:not(.court-switching) {
  transition: opacity 0.3s ease;
}

/* === CASE INFO PANEL (right side) === */
.case-info-panel {
  width: 220px;
  flex-shrink: 0;
  background-color: var(--bg-panel);
  border-left: 3px solid var(--accent);
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.case-info-panel::-webkit-scrollbar {
  display: none;
}

.case-info-panel.case-info-visible .case-info-content {
  animation: case-info-slide-in 0.5s ease-out forwards;
}

@keyframes case-info-slide-in {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.case-info-panel h2 {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.case-info-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Case mode toggle */
.case-mode-toggle {
  display: flex;
  gap: 0;
  border: 2px solid var(--border-dim);
  border-radius: 2px;
  overflow: hidden;
}

.mode-btn {
  flex: 1;
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  padding: 6px 0;
  background: var(--bg-darker);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.15s ease;
}

.mode-btn.mode-active {
  background: var(--accent);
  color: var(--bg-darker);
}

.mode-btn:hover:not(.mode-active) {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.custom-topic-input textarea {
  width: 100%;
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  padding: 10px;
  background: var(--bg-darker);
  color: #fff;
  border: 2px solid var(--border-dim);
  resize: none;
  line-height: 2.2;
  outline: none;
}

.custom-topic-input textarea:focus {
  border-color: var(--accent);
}

.custom-topic-input textarea::placeholder {
  color: #888;
}

.case-info-placeholder {
  font-size: 0.45rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 2.2;
}

.case-info-label {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.case-info-value {
  font-size: 0.45rem;
  color: var(--text-primary);
  line-height: 2.2;
}

/* === CRAB ZONES === */
.courtroom-container .crab-zone {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  animation: breathe 2.5s steps(2) infinite;
}

@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.courtroom-container .crab-zone[data-role="judge"] { animation-duration: 3s; animation-delay: 0s; }
.courtroom-container .crab-zone[data-role="plaintiff"] { animation-duration: 2.2s; animation-delay: 0.4s; }
.courtroom-container .crab-zone[data-role="plaintiff_lawyer"] { animation-duration: 2.8s; animation-delay: 1.1s; }
.courtroom-container .crab-zone[data-role="defendant"] { animation-duration: 2.5s; animation-delay: 0.7s; }
.courtroom-container .crab-zone[data-role="defendant_lawyer"] { animation-duration: 2.6s; animation-delay: 1.5s; }

.crab-sprite-overlay { overflow: visible; animation: none !important; }
.crab-sprite-overlay.speaking { filter: none !important; animation: none !important; }
.crab-sprite-img { width: 100%; display: block; image-rendering: auto; pointer-events: none; }

.courtroom-container .crab-zone.speaking {
  filter: drop-shadow(0 0 8px var(--accent)) drop-shadow(0 0 20px rgba(233, 69, 96, 0.6));
  z-index: 10;
  animation: breathe-speaking 1.4s steps(2) infinite;
}

@keyframes breathe-speaking {
  0%, 100% { transform: translateY(0) scale(1.05); }
  50% { transform: translateY(-4px) scale(1.05); }
}

/* === DIALOGUE BOX === */
.dialogue-box-container {
  display: none;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 700px;
  min-height: 140px;
  max-height: 200px;
  background-color: #000;
  border: 5px solid #fff;
  padding: 16px 20px;
  gap: 16px;
  align-items: flex-start;
  z-index: 30;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.dialogue-box-container.visible { display: flex; }
.dialogue-box-container, .dialogue-box-container * { user-select: none; -webkit-user-select: none; cursor: default; }

.dialogue-portrait {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border: 3px solid #fff;
  background-color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dialogue-portrait img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }

.dialogue-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  overflow: hidden;
}

.dialogue-speaker-name {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.dialogue-text {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: #fff;
  line-height: 2.2;
  overflow: hidden;
  word-break: break-word;
}

.dialogue-advance-indicator {
  font-size: 1rem;
  color: #fff;
  align-self: flex-end;
  animation: blink-indicator 0.8s step-end infinite;
}

@keyframes blink-indicator {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* === DASHBOARD === */
.dashboard-section {
  padding: 0 24px 24px;
  max-width: 1248px;
  margin: 0 auto;
}

/* Dashboard tabs */
.dashboard-tabs {
  display: flex;
  gap: 0;
  border: 2px solid var(--border-dim);
  border-bottom: none;
  overflow: hidden;
}

.dashboard-tab {
  flex: 1;
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  padding: 12px 0;
  background: var(--bg-darker);
  color: var(--text-secondary);
  border: none;
  border-right: 2px solid var(--border-dim);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.15s ease;
}

.dashboard-tab:last-child { border-right: none; }

.dashboard-tab.dashboard-tab-active {
  background: var(--accent);
  color: var(--bg-darker);
}

.dashboard-tab:hover:not(.dashboard-tab-active) {
  background: var(--bg-panel);
  color: var(--text-primary);
}

/* Dashboard panels */
.dashboard-panels {
  border: 2px solid var(--border-dim);
  background-color: var(--bg-panel);
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dashboard-panels::-webkit-scrollbar { display: none; }

.dashboard-panel {
  display: none;
  padding: 16px;
}

.dashboard-panel.dashboard-panel-active {
  display: block;
}

/* Live court cards */
.live-court-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent);
  gap: 12px;
}

.live-court-info {
  flex: 1;
  min-width: 0;
}

.live-court-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #ff2244;
  border-radius: 0;
  animation: live-pulse 1.5s steps(2) infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.live-phase {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.live-court-title {
  font-size: 0.45rem;
  color: var(--text-primary);
  line-height: 1.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-view-btn {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  padding: 6px 14px;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.live-view-btn:hover {
  background: var(--accent);
  color: var(--bg-darker);
  box-shadow: 0 0 10px rgba(233, 69, 96, 0.4);
}

.live-view-btn-active {
  background: var(--accent);
  color: var(--bg-darker);
  box-shadow: 0 0 10px rgba(233, 69, 96, 0.4);
  cursor: default;
}

.pin-icon {
  font-size: 0.7rem;
  margin-right: 4px;
}

.live-court-main {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(233, 69, 96, 0.2);
}

.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-empty {
  font-size: 0.4rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 2;
  padding: 16px 0;
}

/* Verdict cards */
.verdict-card {
  padding: 10px 12px;
  border-left: 3px solid var(--border-dim);
  background-color: rgba(0, 0, 0, 0.2);
}

.verdict-card-guilty { border-left-color: #ff2244; }
.verdict-card-not-guilty { border-left-color: #44ff88; }

.verdict-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.verdict-card-badge {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.verdict-card-guilty .verdict-card-badge { color: #ff2244; }
.verdict-card-not-guilty .verdict-card-badge { color: #44ff88; }

.verdict-card-time {
  font-size: 0.3rem;
  color: var(--text-secondary);
}

.verdict-card-title {
  font-size: 0.4rem;
  color: var(--text-primary);
  line-height: 1.8;
}

/* Queue cards */
.queue-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--accent);
}

.queue-number {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--accent);
  min-width: 24px;
}

.queue-topic {
  font-size: 0.38rem;
  color: var(--text-primary);
  line-height: 1.8;
  flex: 1;
}

.queue-time {
  font-size: 0.3rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Submit case form */
.submit-case-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.submit-case-textarea {
  width: 100%;
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  padding: 10px;
  background: var(--bg-darker);
  color: #fff;
  border: 2px solid var(--border-dim);
  resize: none;
  line-height: 2;
  outline: none;
}

.submit-case-textarea:focus {
  border-color: var(--accent);
}

.submit-case-textarea::placeholder {
  color: #888;
}

.submit-case-btn {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  padding: 10px 20px;
  background-color: var(--accent);
  color: var(--bg-darker);
  border: 2px solid var(--accent);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
}

.submit-case-btn:hover {
  background-color: var(--accent-glow);
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.5);
}

/* Wallet connection */
.wallet-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.connect-wallet-btn {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  padding: 8px 16px;
  background: var(--accent-secondary);
  color: var(--bg-darker);
  border: 2px solid var(--accent-secondary);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
  width: 100%;
}

.connect-wallet-btn:hover {
  box-shadow: 0 0 12px rgba(240, 192, 64, 0.5);
}

.connect-wallet-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wallet-address {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  color: var(--accent-secondary);
  letter-spacing: 1px;
}

.disconnect-wallet-btn {
  font-family: var(--font-pixel);
  font-size: 0.3rem;
  padding: 4px 10px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-dim);
  cursor: pointer;
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

.disconnect-wallet-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === INFO SECTION === */
.info-section {
  background-color: var(--bg-dark);
  border-top: 3px solid var(--border-dim);
  padding: 48px 24px;
}

/* Scroll reveal animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.info-container {
  max-width: 100%;
  margin: 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-title {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.info-text {
  font-size: 0.55rem;
  color: var(--text-secondary);
  line-height: 2.6;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cast-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background-color: var(--bg-panel);
  border: 2px solid var(--border-dim);
}

.cast-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: auto;
}

.cast-name {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
}

.cast-desc {
  font-size: 0.4rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 2;
}

.info-footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-footer p {
  font-size: 0.4rem;
  color: var(--border-dim);
  letter-spacing: 2px;
}

.info-footer-sub {
  font-size: 0.35rem !important;
  color: var(--text-secondary) !important;
  font-style: italic;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background-color: var(--bg-panel);
  border: 2px solid var(--border-dim);
}

.stat-number {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  color: var(--accent);
}

.stat-label {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border-left: 3px solid var(--accent);
}

.faq-q {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--accent-secondary);
  margin-bottom: 8px;
}

.faq-a {
  font-size: 0.45rem;
  color: var(--text-secondary);
  line-height: 2.4;
}

/* Roadmap */
.roadmap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.roadmap-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background-color: var(--bg-panel);
  border: 2px solid var(--border-dim);
}

.roadmap-item.done {
  border-color: var(--accent);
  opacity: 0.7;
}

.roadmap-phase {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--accent);
  white-space: nowrap;
  min-width: 80px;
}

.roadmap-text {
  font-size: 0.45rem;
  color: var(--text-primary);
  line-height: 2;
}

.roadmap-item.done .roadmap-text {
  color: var(--text-secondary);
}

/* Disclaimer */
.disclaimer-text {
  font-size: 0.4rem !important;
  color: var(--border-dim) !important;
  line-height: 2.8 !important;
}

/* === DAPP FOOTER === */
.dapp-footer {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--border-dim);
  background-color: rgba(22, 33, 62, 0.5);
  margin-top: auto;
}

.dapp-footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dapp-footer-title {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 2px;
}

.dapp-footer-desc {
  font-size: 0.45rem;
  color: var(--text-secondary);
  line-height: 2;
}

.dapp-footer-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.dapp-footer-link {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color var(--transition-fast);
}

.dapp-footer-link:hover {
  color: var(--accent);
}

/* === COUNTDOWN === */
.countdown-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
}

.countdown-number {
  font-family: var(--font-pixel);
  font-size: 4rem;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(233, 69, 96, 0.8), 0 0 60px rgba(233, 69, 96, 0.4);
  animation: countdown-in 0.15s ease-out forwards, countdown-out 0.2s ease-in 0.7s forwards;
}

.countdown-text {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--accent-secondary);
  text-shadow: 0 0 20px rgba(240, 192, 64, 0.8), 0 0 40px rgba(240, 192, 64, 0.4);
  letter-spacing: 4px;
  animation: countdown-in 0.15s ease-out forwards;
}

@keyframes countdown-in {
  0% { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes countdown-out {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0; }
}

/* === ERROR & OVERLAYS === */
.error-overlay {
  position: absolute; inset: 0;
  background-color: rgba(15, 15, 26, 0.9);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; z-index: 20; padding: 24px; text-align: center;
}

.error-overlay p { font-family: var(--font-pixel); font-size: 0.5rem; color: var(--accent); line-height: 2; }

.error-overlay button, .trial-conclusion button {
  font-family: var(--font-pixel); font-size: 0.65rem;
  padding: 12px 32px; background-color: var(--accent);
  color: var(--bg-darker); border: 2px solid var(--accent);
  cursor: pointer; transition: all var(--transition-fast);
}

.error-overlay button:hover, .trial-conclusion button:hover {
  background-color: var(--accent-glow);
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.5);
}

.trial-conclusion {
  position: absolute; inset: 0;
  background-color: rgba(0, 0, 0, 0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; z-index: 20;
  animation: conclusion-appear 0.6s ease-out forwards;
  padding: 32px;
}

@keyframes conclusion-appear { 0% { opacity: 0; } 100% { opacity: 1; } }

.verdict-title {
  font-family: var(--font-pixel);
  font-size: 2rem;
  letter-spacing: 8px;
  animation: verdict-slam 0.5s ease-out forwards;
}

@keyframes verdict-slam {
  0% { transform: scale(2.5); opacity: 0; }
  60% { transform: scale(0.9); opacity: 1; }
  80% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.verdict-guilty .verdict-title {
  color: #ff2244;
  text-shadow: 0 0 20px rgba(255, 34, 68, 0.5);
}
.verdict-not-guilty .verdict-title {
  color: #44ff88;
  text-shadow: 0 0 20px rgba(68, 255, 136, 0.5);
}

.verdict-subtitle {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--accent-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  max-width: 80%;
  line-height: 2;
  animation: verdict-fade-in 0.8s ease-out 0.3s both;
}

@keyframes verdict-fade-in {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.verdict-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  image-rendering: auto;
  animation: verdict-fade-in 0.6s ease-out 0.2s both;
}

.verdict-summary {
  max-width: 500px; text-align: center;
  padding: 16px 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.6);
  animation: verdict-fade-in 1s ease-out 0.5s both;
}

.verdict-summary p {
  font-family: var(--font-body);
  font-size: 0.45rem;
  color: #fff;
  line-height: 2.4;
}

.verdict-divider {
  width: 60px;
  height: 2px;
  background: var(--border-dim);
  animation: verdict-fade-in 0.8s ease-out 0.4s both;
}

.trial-conclusion h3 { font-family: var(--font-pixel); font-size: 0.8rem; color: var(--accent-secondary); }

/* === RARE CRAB EVENTS === */
.event-tantrum { animation: crab-tantrum 0.3s steps(2) 4 !important; z-index: 15 !important; }
@keyframes crab-tantrum { 0%, 100% { transform: translateX(0) rotate(0deg); } 25% { transform: translateX(-6px) rotate(-8deg); } 75% { transform: translateX(6px) rotate(8deg); } }

.event-facepalm { animation: crab-facepalm 1s steps(3) 1 !important; z-index: 15 !important; }
@keyframes crab-facepalm { 0% { transform: translateY(0); } 30% { transform: translateY(6px) scale(0.95); } 60% { transform: translateY(6px) scale(0.95); } 100% { transform: translateY(0) scale(1); } }

.event-objection { animation: crab-objection 0.25s steps(2) 6 !important; z-index: 15 !important; filter: drop-shadow(0 0 12px var(--accent-secondary)) !important; }
@keyframes crab-objection { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-10px) scale(1.15); } }

.event-shrug { animation: crab-shrug 1s steps(4) 1 !important; z-index: 15 !important; }
@keyframes crab-shrug { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(5deg) translateY(-2px); } 50% { transform: rotate(-5deg) translateY(-2px); } 75% { transform: rotate(3deg); } }

.event-slam { animation: crab-slam 0.2s steps(2) 4 !important; z-index: 15 !important; filter: drop-shadow(0 0 15px var(--accent)) !important; }
@keyframes crab-slam { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px) scale(1.1); } }
