/* ============================================================
   RIVER DRIFT AU — drift.css
   ============================================================ */

:root {
  --rd-forest: #0E1712;
  --rd-bark: #261C14;
  --rd-panel: #33271E;
  --rd-amber: #F59E0B;
  --rd-glow: rgba(245, 158, 11, 0.25);
  --rd-text: #E6EFEA;
  --rd-muted: #8F9F96;
  --rd-dim: #54625A;
  --rd-red: #EF4444;
  --rd-green: #10B981;
  --rd-radius: 6px;
  --rd-radius-lg: 16px;
  --rd-font-serif: 'Lora', serif;
  --rd-font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  background: var(--rd-forest);
  color: var(--rd-text);
  font-family: var(--rd-font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* NAVBAR */
.rd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--rd-bark);
  border-bottom: 2px solid var(--rd-amber);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.rd-logo {
  font-family: var(--rd-font-serif);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--rd-amber);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rd-menu {
  display: flex;
  gap: 12px;
  align-items: center;
}

.rd-link {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--rd-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--rd-radius);
  transition: all 0.15s;
}

.rd-link:hover, .rd-link.active {
  color: var(--rd-amber);
  background: rgba(245, 158, 11, 0.08);
}

.rd-lang {
  position: relative;
}

.rd-lang-btn {
  font-family: var(--rd-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--rd-radius);
  color: var(--rd-amber);
  cursor: pointer;
}

.rd-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: var(--rd-bark);
  border: 1px solid var(--rd-amber);
  border-radius: var(--rd-radius);
  z-index: 200;
  min-width: 120px;
}

.rd-dropdown.open {
  display: block;
}

.rd-opt {
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--rd-muted);
  cursor: pointer;
}

.rd-opt:hover {
  background: rgba(245, 158, 11, 0.08);
  color: var(--rd-amber);
}

.rd-opt.selected {
  color: var(--rd-amber);
}

/* HUD */
#hud {
  display: flex;
  width: 100%;
  max-width: 820px;
  background: var(--rd-bark);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--rd-radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hud-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.hud-cell:last-child {
  border-right: none;
}

.hud-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rd-muted);
}

.hud-value {
  font-family: var(--rd-font-serif);
  font-size: 1.25rem;
  color: var(--rd-amber);
  font-weight: 700;
}

#hud-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.03);
}

.diff-btn {
  font-family: var(--rd-font-body);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  background: transparent;
  border: 1px solid var(--rd-dim);
  border-radius: var(--rd-radius);
  color: var(--rd-muted);
  cursor: pointer;
}

.diff-btn.active, .diff-btn:hover {
  border-color: var(--rd-amber);
  color: var(--rd-amber);
  background: rgba(245, 158, 11, 0.05);
}

#start-btn {
  font-family: var(--rd-font-serif);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  background: var(--rd-amber);
  border: none;
  border-radius: var(--rd-radius);
  color: #000;
  cursor: pointer;
  box-shadow: 0 0 10px var(--rd-glow);
}

/* GAME SECTION */
#game-section {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 10px;
}

#canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 820px;
  border-radius: var(--rd-radius-lg);
  overflow: hidden;
  border: 2px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  cursor: crosshair;
}

#game-canvas {
  display: block;
  width: 100%;
  background: #090e0c;
}

#phase-label {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 16px;
  border-radius: var(--rd-radius);
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.2s;
  background: rgba(14, 23, 18, 0.9);
  border: 1px solid var(--rd-amber);
  color: var(--rd-amber);
}

#phase-label.visible {
  opacity: 1;
}

#phase-label.bite {
  background: var(--rd-red);
  border-color: #FF5555;
  color: #FFF;
  animation: rdBitePulse 0.4s ease infinite alternate;
}

@keyframes rdBitePulse {
  from { transform: translateX(-50%) scale(1); }
  to { transform: translateX(-50%) scale(1.05); }
}

#score-flash {
  position: absolute;
  left: 50%; top: 25%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
}

#score-flash.show {
  animation: rdFlash 1.2s ease-out forwards;
}

@keyframes rdFlash {
  0% { opacity: 1; transform: translateX(-50%) scale(0.9); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-50px); }
}

/* TENSION */
#tension-wrap {
  width: 100%;
  max-width: 820px;
  background: rgba(14, 23, 18, 0.8);
  border: 1px solid var(--rd-dim);
  border-radius: var(--rd-radius);
  overflow: hidden;
  height: 10px;
  display: none;
}

#tension-wrap.visible {
  display: block;
}

#tension-fill {
  height: 100%;
  width: 0;
  transition: width 0.08s linear;
}

#tension-fill.ok {
  background: var(--rd-green);
}

#tension-fill.warn {
  background: var(--rd-amber);
}

#tension-fill.snap {
  background: var(--rd-red);
}

/* CATCH LOG */
#catch-display {
  width: 100%;
  max-width: 820px;
  background: var(--rd-bark);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--rd-radius-lg);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.catch-label {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rd-muted);
}

#caught-fish {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.fish-icon {
  font-size: 1.25rem;
}

/* OVERLAY SCREEN */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(14, 23, 18, 0.96);
  z-index: 30;
  border-radius: var(--rd-radius-lg);
  transition: opacity 0.25s;
}

#overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-icon {
  font-size: 3.8rem;
  animation: rdFloat 3s ease-in-out infinite;
}

@keyframes rdFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.overlay-title {
  font-family: var(--rd-font-serif);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--rd-amber);
}

.overlay-sub {
  color: var(--rd-muted);
  font-size: 0.85rem;
  text-align: center;
  max-width: 440px;
  line-height: 1.5;
}

.fish-showcase {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.fish-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  color: var(--rd-dim);
}

.overlay-btn {
  font-family: var(--rd-font-serif);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 10px 32px;
  background: var(--rd-amber);
  border: none;
  border-radius: var(--rd-radius);
  color: #000;
  cursor: pointer;
  box-shadow: 0 0 10px var(--rd-glow);
}

/* DETAILS & POLICY CARDS */
.info-main {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  position: relative;
  z-index: 10;
}

.content-card {
  background: var(--rd-bark);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--rd-radius-lg);
  padding: 24px;
}

.content-card h1 {
  font-family: var(--rd-font-serif);
  font-size: 1.6rem;
  color: var(--rd-amber);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.content-card h2 {
  font-family: var(--rd-font-serif);
  font-size: 1.15rem;
  color: var(--rd-amber);
  margin: 20px 0 8px;
}

.content-card p, .content-card li {
  font-size: 0.85rem;
  color: var(--rd-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.content-card ul {
  padding-left: 18px;
  margin-bottom: 10px;
}

.contact-card.wide {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--rd-amber);
  border-radius: var(--rd-radius);
  padding: 12px;
  margin-top: 20px;
}

.contact-card.wide span {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--rd-dim);
  text-transform: uppercase;
  display: block;
}

.contact-card.wide p {
  margin: 0;
  color: var(--rd-amber);
}

.contact-card a {
  color: var(--rd-amber);
  text-decoration: none;
}

/* FOOTER */
.rd-footer {
  margin-top: auto;
  background: var(--rd-bark);
  border-top: 2px solid var(--rd-amber);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 10;
}

.footer-left {
  font-size: 0.75rem;
  color: var(--rd-dim);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--rd-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--rd-amber);
}

/* RESPONSIVE */
@media(max-width: 768px) {
  .rd-header { padding: 12px 16px; }
  .info-main { padding: 16px 12px; }
}

@media(max-width: 480px) {
  .rd-link { display: none; }
  .rd-link.always { display: block; }
  #hud { flex-wrap: wrap; }
  .hud-cell { min-width: 33%; padding: 6px 2px; }
  #hud-controls { width: 100%; justify-content: center; border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 8px; }
}
