/* ----------------------------------------------------
   대항해시대: 바다의 미녀들 CSS Stylesheet
   Design System: Premium Glassmorphism & Sea Aesthetics
---------------------------------------------------- */

:root {
  --color-bg-dark: #070b19;
  --color-glass-bg: rgba(15, 28, 63, 0.45);
  --color-glass-border: rgba(255, 255, 255, 0.08);
  --color-primary: #102652;
  --color-accent-teal: #00f2fe;
  --color-accent-blue: #4facfe;
  --color-gold: #ffd700;
  --color-gold-hover: #ffea70;
  --color-text-light: #f8fafc;
  --color-text-gray: #94a3b8;
  --color-danger: #ff4757;
  --color-danger-bg: rgba(255, 71, 87, 0.15);
  --color-success: #2ed573;
  --font-sans: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset and Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Image Rendering optimization for Pixel Art */
img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Atmospheric Sea Wave Background animation */
.sea-background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #050b1d 0%, #0c1b3d 50%, #08122c 100%);
  overflow: hidden;
}

.sea-background-overlay::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.05) 0%, transparent 80%);
  animation: rotateLight 30s linear infinite;
}

@keyframes rotateLight {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Premium Typography classes */
.font-heading {
  font-family: var(--font-serif);
}

.highlight-text {
  color: var(--color-accent-teal);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.gold-text {
  color: var(--color-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  font-weight: 600;
}

.text-danger {
  color: var(--color-danger);
  text-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
}

/* Floating Audio Control UI */
.audio-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 50px;
}

.audio-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s ease;
}

.audio-btn:hover {
  transform: scale(1.15);
}

.audio-status {
  font-size: 12px;
  color: var(--color-text-gray);
  font-weight: 600;
}

/* Glassmorphism UI panel standard styling */
.glass-panel {
  background: var(--color-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

/* Game Outer Wrapper */
#game-container {
  width: 95%;
  max-width: 1100px;
  height: 90vh;
  max-height: 720px;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Screen Switching mechanism */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

/* ====================================================
   1. TITLE SCREEN STYLE
==================================================== */
#title-screen {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 30px;
}

.title-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-image {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
  animation: floatShip 4s ease-in-out infinite;
}

.game-title {
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #ffffff 0%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  margin-top: 10px;
}

.game-subtitle {
  font-family: var(--font-serif);
  font-size: 28px;
  font-style: italic;
  color: var(--color-accent-teal);
  letter-spacing: 6px;
  margin-top: -5px;
}

.title-content-card {
  padding: 30px 40px;
  max-width: 550px;
}

.intro-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-gray);
  margin-bottom: 25px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--color-accent-blue) 0%, var(--color-accent-teal) 100%);
  border: none;
  color: #000;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  padding: 14px 40px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
  background: linear-gradient(90deg, #ffd700 0%, #ffea70 100%);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text-light);
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-accent-teal);
}

.animate-pulse {
  animation: pulsePulse 2s infinite;
}

@keyframes pulsePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes floatShip {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-2deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.game-footer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

/* ====================================================
   2. MAIN GAME SCREEN LAYOUT
==================================================== */
#main-game-screen {
  gap: 15px;
}

/* Top Status Panel */
.top-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  font-size: 14px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-label {
  color: var(--color-text-gray);
  font-weight: 500;
}

.status-value {
  font-weight: 600;
}

/* Supply Bar UI element */
.supply-bar-container {
  width: 80px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.supply-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-accent-teal) 0%, var(--color-success) 100%);
  transition: width 0.3s ease;
}

/* Main Content Workspace */
.game-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 15px;
  flex: 1;
  height: calc(100% - 70px);
}

.left-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.center-stage-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}

/* Left panels styling */
.nav-control-card, .crew-preview-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.card-instruction {
  font-size: 12px;
  color: var(--color-text-gray);
  line-height: 1.5;
  margin-bottom: 15px;
}

kbd {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 1px 5px;
  margin: 0 2px;
  font-size: 10px;
}

.mini-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.15);
  padding: 10px;
  border-radius: var(--border-radius-sm);
}

.metric-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.metric-num {
  font-weight: 600;
  color: var(--color-accent-teal);
}

.metric-name {
  color: var(--color-text-gray);
}

.crew-compact-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  max-height: 240px;
}

.no-crew-notice {
  font-size: 12px;
  color: var(--color-text-gray);
  text-align: center;
  margin: auto 0;
  padding: 20px 0;
}

.crew-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: var(--border-radius-sm);
}

.crew-item-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 242, 254, 0.2);
}

.crew-avatar-mini {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  background: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.crew-info-mini {
  display: flex;
  flex-direction: column;
}

.crew-name-mini {
  font-size: 13px;
  font-weight: 600;
}

.crew-stat-mini {
  font-size: 11px;
  color: var(--color-text-gray);
}

/* ====================================================
   3. PORT TABS NAVIGATION
==================================================== */
.tab-header {
  display: flex;
  padding: 6px;
  gap: 5px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--color-text-gray);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}

.btn-depart-action {
  margin-left: auto;
  background: linear-gradient(90deg, #ff4b1f 0%, #ff9068 100%) !important;
  color: #fff !important;
  font-weight: 800;
  border-radius: var(--border-radius-sm);
}

.btn-depart-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 75, 31, 0.3);
}

/* Stage Sections switcher */
.stage-section {
  display: none;
  flex: 1;
  height: calc(100% - 65px);
}

.stage-section.active {
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.tab-content.active {
  display: block;
}

/* ====================================================
   4. CANVA PLAYFIELDS (Sailing & Battle)
==================================================== */
.canvas-container {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
}

#sailing-canvas, #battle-canvas {
  width: 100%;
  height: 100%;
  background: #030814;
  border-radius: var(--border-radius-sm);
  display: block;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.canvas-legend {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--color-text-gray);
  justify-content: center;
}

/* ====================================================
   5. TRADE MARKET TAB
==================================================== */
.market-view-container {
  padding: 24px;
}

.market-header {
  margin-bottom: 20px;
}

.market-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.market-subtitle {
  font-size: 13px;
  color: var(--color-text-gray);
}

.trade-grid-wrapper {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.15);
}

.trade-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 18px;
  color: var(--color-text-gray);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.trade-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.trade-actions {
  display: flex;
  gap: 8px;
}

.btn-trade {
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-trade.buy {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--color-accent-teal);
}

.btn-trade.buy:hover {
  background: rgba(0, 242, 254, 0.3);
}

.btn-trade.sell {
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid rgba(46, 213, 115, 0.3);
  color: var(--color-success);
}

.btn-trade.sell:hover {
  background: rgba(46, 213, 115, 0.3);
}

/* ====================================================
   6. TAVERN & RECRUIT SYSTEM
==================================================== */
.tavern-view-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tavern-intro {
  height: 120px;
  background-size: cover;
  background-position: center;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.tavern-tint-overlay {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(8, 14, 30, 0.9) 0%, rgba(8, 14, 30, 0.5) 100%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tavern-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-gold);
}

.tavern-desc {
  font-size: 13px;
  color: var(--color-text-gray);
  max-width: 600px;
  line-height: 1.4;
}

/* Navigator cards layout grids */
.navigator-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  padding-bottom: 20px;
}

.navigator-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.navigator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent-blue) 0%, var(--color-accent-teal) 100%);
}

.nav-card-main {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
}

.nav-card-portrait {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.nav-card-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nav-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.nav-role {
  font-size: 12px;
  color: var(--color-accent-teal);
  font-weight: 600;
  margin-bottom: 6px;
}

.nav-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  font-size: 11px;
}

.nav-stat-row {
  display: flex;
  justify-content: space-between;
  color: var(--color-text-gray);
}

.nav-stat-row strong {
  color: #fff;
}

.nav-desc-bubble {
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-gray);
  margin-bottom: 12px;
  flex: 1;
}

.nav-recruit-cost {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
  margin-top: auto;
}

.recruit-price {
  font-weight: 700;
  color: var(--color-gold);
}

/* Album view adjustments */
.album-style .navigator-card::before {
  background: var(--color-gold);
}

.album-style .navigator-card {
  filter: grayscale(1);
  opacity: 0.6;
  transition: var(--transition-smooth);
}

.album-style .navigator-card.recruited {
  filter: none;
  opacity: 1;
  border-color: rgba(255, 215, 0, 0.3);
}

.album-style .navigator-card.recruited::before {
  background: linear-gradient(90deg, var(--color-gold) 0%, #ffea70 100%);
}

.btn-recruit {
  border: none;
  padding: 6px 16px;
  font-family: var(--font-sans);
  font-weight: 800;
  border-radius: 20px;
  cursor: pointer;
  background: var(--color-gold);
  color: #000;
  font-size: 11px;
  transition: var(--transition-smooth);
}

.btn-recruit:hover {
  background: var(--color-gold-hover);
  transform: translateY(-1px);
}

.btn-recruit.recruited {
  background: rgba(255,255,255,0.08);
  color: var(--color-text-gray);
  cursor: not-allowed;
}

.btn-talk {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-talk:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent-teal);
}

/* ====================================================
   7. SHIPYARD TAB
==================================================== */
.shipyard-view-container {
  padding: 24px;
}

.shipyard-header {
  margin-bottom: 20px;
}

.shipyard-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.shipyard-desc {
  font-size: 13px;
  color: var(--color-text-gray);
}

.shipyard-upgrades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 15px;
}

.upgrade-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

.upgrade-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.upgrade-info p {
  font-size: 12px;
  color: var(--color-text-gray);
  line-height: 1.4;
  margin-bottom: 12px;
}

.upgrade-cost {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gold);
}

.btn-upgrade {
  width: 100%;
  font-size: 13px;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
}

.special-galleon-btn {
  background: linear-gradient(90deg, var(--color-gold) 0%, #ff9f43 100%) !important;
  color: #000 !important;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2);
}

.special-galleon-btn:hover {
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}

/* ====================================================
   8. BATTLE ENGINE STYLE
==================================================== */
.battle-view-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}

.battle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.battle-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
}

.battle-stats-tracker {
  display: flex;
  gap: 30px;
}

.battle-ship-hp {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--color-text-gray);
}

.battle-ship-hp strong {
  font-size: 14px;
  color: #fff;
}

.hp-bar-container {
  width: 150px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.hp-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--color-success);
  transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hp-bar-fill.enemy {
  background: var(--color-danger);
}

.battle-playfield {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 15px;
  height: 280px;
}

.battle-combat-log {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  font-size: 11px;
  line-height: 1.5;
  overflow-y: auto;
  color: var(--color-text-gray);
  max-height: 280px;
}

.log-entry {
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 4px;
}

.log-entry.player {
  color: var(--color-accent-teal);
}

.log-entry.enemy {
  color: var(--color-danger);
}

.log-entry.system {
  color: var(--color-gold);
  font-weight: 500;
}

.battle-commands-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.btn-action-primary {
  border: none;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3c72 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-action-primary:hover {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border-color: var(--color-accent-teal);
}

.btn-action-secondary {
  border: none;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #000;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 13px;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-action-secondary:hover:not(.disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.3);
}

.btn-action-secondary.disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

.btn-action-danger {
  border: 1px solid var(--color-danger);
  background: var(--color-danger-bg);
  color: var(--color-danger);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-action-danger:hover {
  background: var(--color-danger);
  color: #fff;
}

/* ====================================================
   9. INTERACTIVE DIALOG BOX OVERLAY
==================================================== */
.dialog-box {
  position: absolute;
  bottom: 20px;
  left: 5%;
  right: 5%;
  width: 90%;
  display: flex;
  gap: 20px;
  padding: 20px 24px;
  align-items: center;
  z-index: 10;
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.dialog-portrait-wrapper {
  flex-shrink: 0;
}

.dialog-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--color-gold);
  background: var(--color-primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.dialog-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dialog-speaker {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-gold);
}

.dialog-message {
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
}

.dialog-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}

.dialog-actions-row button {
  font-size: 12px;
  padding: 6px 20px;
}

/* Media Queries for responsive screens */
@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .left-sidebar-panel {
    display: none; /* Hide sidebar on small screens to fit map */
  }
}

/* ====================================================
   10. ADDITIONAL EXPANSION FEATURES (Save/Load & Discoveries)
==================================================== */
.system-actions {
  display: flex;
  gap: 6px;
  margin-left: 10px;
}

.btn-system-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text-light);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-system-action:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--color-accent-teal);
  color: #fff;
}

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

/* Custom styling for Discovery item cards */
.discovery-card-gold {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.25);
  border-color: rgba(255, 215, 0, 0.3) !important;
}

.discovery-card-gold::before {
  background: linear-gradient(90deg, var(--color-gold) 0%, #ff8c00 100%) !important;
}
