/* ============================================================
   MOONLIT CAST AU — main-style.css
   ============================================================ */

:root {
  --mc-abyss: #0A0612;
  --mc-surface: #140E24;
  --mc-panel-lt: #1F1536;
  --mc-gold: #FFD23F;
  --mc-purple: #BD93F9;
  --mc-crimson: #FF5555;
  --mc-green: #50FA7B;
  --mc-text: #F8F5FC;
  --mc-muted: #A197B8;
  --mc-dim: #605777;
  --mc-radius-sm: 6px;
  --mc-radius-md: 12px;
  --mc-radius-lg: 20px;
  --mc-shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.5);
  --mc-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.7);
  --mc-font-title: 'Space Grotesk', sans-serif;
  --mc-font-body: 'Inter', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 80% 20%, rgba(189, 147, 249, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(255, 210, 63, 0.03) 0%, transparent 60%);
}

/* NAVIGATION HEADER */
.mc-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px;
  background: rgba(10, 6, 18, 0.95);
  border-bottom: 2px solid rgba(189, 147, 249, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--mc-shadow-sm);
  backdrop-filter: blur(8px);
}

.mc-logo {
  font-family: var(--mc-font-title);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--mc-gold);
  text-shadow: 0 0 10px rgba(255, 210, 63, 0.35);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-logo-ico {
  font-size: 1.3rem;
}

.mc-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mc-menu-link {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--mc-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--mc-radius-sm);
  transition: all 0.2s ease;
}

.mc-menu-link:hover, .mc-menu-link.active {
  color: var(--mc-purple);
  background: rgba(189, 147, 249, 0.08);
}

.mc-lang-selector {
  position: relative;
}

.mc-lang-trigger {
  font-family: var(--mc-font-body);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  background: rgba(189, 147, 249, 0.05);
  border: 1px solid rgba(189, 147, 249, 0.25);
  border-radius: var(--mc-radius-sm);
  color: var(--mc-purple);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mc-lang-trigger:hover {
  background: rgba(189, 147, 249, 0.15);
}

.mc-lang-trigger .arrow {
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.mc-lang-trigger.open .arrow {
  transform: rotate(180deg);
}

.mc-lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: var(--mc-surface);
  border: 1px solid rgba(189, 147, 249, 0.25);
  border-radius: var(--mc-radius-sm);
  z-index: 200;
  box-shadow: var(--mc-shadow-lg);
  min-width: 140px;
}

.mc-lang-dropdown.open {
  display: block;
}

.mc-lang-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mc-muted);
  cursor: pointer;
}

.mc-lang-opt:hover {
  background: rgba(189, 147, 249, 0.1);
  color: var(--mc-purple);
}

.mc-lang-opt.selected {
  color: var(--mc-gold);
}

/* HUD PANEL */
#hud {
  display: flex;
  width: 100%;
  max-width: 820px;
  background: rgba(20, 14, 36, 0.95);
  border: 1px solid rgba(189, 147, 249, 0.2);
  border-radius: var(--mc-radius-md);
  overflow: hidden;
  box-shadow: var(--mc-shadow-lg);
  z-index: 10;
  flex-shrink: 0;
}

.hud-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-right: 1px solid rgba(189, 147, 249, 0.08);
}

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

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

.hud-value {
  font-family: var(--mc-font-title);
  font-size: 1.15rem;
  color: var(--mc-gold);
  line-height: 1.1;
}

#hud-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-left: 1px solid rgba(189, 147, 249, 0.08);
  flex-shrink: 0;
}

.diff-btn {
  font-family: var(--mc-font-body);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid rgba(189, 147, 249, 0.25);
  border-radius: 12px;
  color: var(--mc-muted);
  cursor: pointer;
}

.diff-btn.active, .diff-btn:hover {
  border-color: var(--mc-purple);
  color: var(--mc-purple);
  background: rgba(189, 147, 249, 0.06);
}

#start-btn {
  font-family: var(--mc-font-title);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  background: linear-gradient(135deg, #6B3BA7, #8B5CF6);
  border: none;
  border-radius: var(--mc-radius-sm);
  color: #FFF;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

#start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

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

#canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 820px;
  border-radius: var(--mc-radius-md);
  overflow: hidden;
  border: 2px solid rgba(189, 147, 249, 0.25);
  box-shadow: var(--mc-shadow-lg);
  cursor: crosshair;
  background: #020408;
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
}

#phase-label {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mc-font-title);
  font-size: 0.95rem;
  padding: 4px 18px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.25s;
  background: rgba(20, 14, 36, 0.85);
  border: 1px solid rgba(189, 147, 249, 0.3);
  color: var(--mc-purple);
}

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

#phase-label.bite {
  background: rgba(255, 85, 85, 0.85);
  border-color: #FF7777;
  color: #FFF;
  animation: mcBitePulse 0.4s ease infinite alternate;
}

@keyframes mcBitePulse {
  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-family: var(--mc-font-title);
  font-size: 1.8rem;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
}

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

@keyframes mcFlashAnim {
  0% { opacity: 1; transform: translateX(-50%) scale(0.8); }
  20% { opacity: 1; transform: translateX(-50%) scale(1.1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-60px); }
}

/* TENSION METER */
#tension-wrap {
  width: 100%;
  max-width: 820px;
  background: rgba(20, 14, 36, 0.7);
  border: 1px solid rgba(189, 147, 249, 0.15);
  border-radius: 8px;
  overflow: hidden;
  height: 14px;
  display: none;
}

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

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

#tension-fill.ok {
  background: linear-gradient(90deg, var(--mc-green), #A3F7BF);
}

#tension-fill.warn {
  background: linear-gradient(90deg, var(--mc-gold), #FFB86C);
}

#tension-fill.snap {
  background: linear-gradient(90deg, var(--mc-crimson), #FF6E6E);
}

/* CAUGHT TIER ROW */
#catch-display {
  width: 100%;
  max-width: 820px;
  background: rgba(20, 14, 36, 0.9);
  border: 1px solid rgba(189, 147, 249, 0.15);
  border-radius: var(--mc-radius-md);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  box-shadow: var(--mc-shadow-sm);
}

.catch-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mc-dim);
}

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

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

/* INTERFACE OVERLAY SCREEN */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(10, 6, 18, 0.94);
  backdrop-filter: blur(8px);
  z-index: 30;
  border-radius: var(--mc-radius-md);
  transition: opacity 0.3s ease;
}

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

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

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

.overlay-title {
  font-family: var(--mc-font-title);
  font-size: 2rem;
  color: var(--mc-gold);
  text-align: center;
  text-shadow: 0 0 15px rgba(255, 210, 63, 0.35);
}

.overlay-sub {
  color: var(--mc-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;
  gap: 2px;
  font-size: 0.65rem;
  color: var(--mc-dim);
}

.overlay-btn {
  font-family: var(--mc-font-title);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 36px;
  background: linear-gradient(135deg, #6B3BA7, #8B5CF6);
  border: none;
  border-radius: var(--mc-radius-lg);
  color: #FFF;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.overlay-btn:hover {
  transform: translateY(-1px);
}

/* ABOUT & LEGAL PAGES SURFACES */
.info-page {
  background: var(--mc-abyss);
}

.info-main {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 30px 16px 60px;
  position: relative;
  z-index: 10;
}

.content-card {
  background: rgba(20, 14, 36, 0.9);
  border: 1px solid rgba(189, 147, 249, 0.2);
  border-radius: var(--mc-radius-lg);
  padding: 24px;
  box-shadow: var(--mc-shadow-lg);
}

.content-card h1 {
  font-family: var(--mc-font-title);
  font-size: 1.8rem;
  color: var(--mc-gold);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(189, 147, 249, 0.15);
  padding-bottom: 8px;
}

.content-card h2 {
  font-family: var(--mc-font-title);
  font-size: 1.15rem;
  color: var(--mc-purple);
  margin: 20px 0 8px;
}

.content-card p {
  font-size: 0.85rem;
  color: var(--mc-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

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

.content-card li {
  font-size: 0.85rem;
  color: var(--mc-muted);
  margin-bottom: 4px;
}

.contact-card.wide {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(189, 147, 249, 0.25);
  border-radius: var(--mc-radius-md);
  padding: 14px 20px;
  margin-top: 20px;
}

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

.contact-card.wide p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--mc-purple);
}

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

/* FOOTER SECTION */
.mc-footer {
  margin-top: auto;
  background: rgba(10, 6, 18, 0.98);
  border-top: 1px solid rgba(189, 147, 249, 0.15);
  padding: 16px 30px;
  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(--mc-dim);
}

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

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

.footer-links a:hover {
  color: var(--mc-purple);
}

/* RESPONSIVE LAYOUT */
@media(max-width: 768px) {
  .mc-navbar { padding: 10px 16px; }
  .mc-menu { gap: 8px; }
  .info-main { padding: 20px 12px; }
  .mc-footer { padding: 12px 16px; }
}

@media(max-width: 480px) {
  .mc-menu-link { display: none; }
  .mc-menu-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(189, 147, 249, 0.08); padding: 8px; }
  .overlay-title { font-size: 1.6rem; }
}
