/* ==========================================================================
   ARCHIV DES VERGESSENS - AAA RPG GRAPHICAL OVERHAUL
   ========================================================================== */

:root {
  --bg-dark: #050508;
  --bg-panel: rgba(10, 10, 15, 0.85);
  --bg-inner: rgba(3, 3, 5, 0.9);
  --border-gold: rgba(212, 175, 55, 0.2);
  --border-gold-hover: rgba(212, 175, 55, 0.6);
  --border-light: rgba(255, 255, 255, 0.04);
  
  --text-gold: #d4af37;
  --text-gold-light: #f3e5ab;
  --text-gold-shadow: rgba(212, 175, 55, 0.4);
  --text-light: #f0f0f5;
  --text-muted: #7e7e8d;
  
  --color-blue: #5c8bb0;
  --color-blue-glow: rgba(92, 139, 176, 0.4);
  --color-red: #b84646;
  --color-green: #388e3c;
  --color-dust: #9c84c4;
  
  --gold-glow: 0 0 12px var(--text-gold-shadow);
  --blue-glow: 0 0 12px var(--color-blue-glow);
  --panel-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --glass-blur: blur(20px);
  --font-title: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
}

/* --- RESET & BASIC HYGIENE --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  user-select: none;
}

/* --- CINEMATIC AMBIENCE --- */
.fullscreen-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.vignette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle, transparent 30%, rgba(0, 0, 0, 0.9) 100%);
  pointer-events: none;
  z-index: 10;
}

#app-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

/* --- PREMIUM TYPOGRAPHY & TEXT GLOWS --- */
.glow-text {
  font-family: var(--font-title);
  color: var(--text-gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), var(--gold-glow);
  letter-spacing: 0.15em;
  font-weight: 700;
  text-transform: uppercase;
}

.subtitle {
  font-family: var(--font-title);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.text-gold { color: var(--text-gold); text-shadow: 0 0 8px rgba(212, 175, 55, 0.2); }
.text-highlight { color: var(--color-blue); text-shadow: var(--blue-glow); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--color-red); text-shadow: 0 0 8px rgba(184, 70, 70, 0.4); }
.text-success { color: var(--color-green); text-shadow: 0 0 8px rgba(56, 142, 60, 0.4); }
.text-dust { color: var(--color-dust); text-shadow: 0 0 10px rgba(156, 132, 196, 0.4); }
.text-sm { font-size: 0.8rem; }
.text-bold { font-weight: 600; }
.text-center { text-align: center; }

/* --- GLASSMORPHISM PANEL METALLIC OVERHAUL --- */
.glass-panel {
  background: linear-gradient(135deg, rgba(16, 16, 24, 0.85) 0%, rgba(8, 8, 12, 0.95) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.glass-inner-panel {
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.9) 0%, rgba(2, 2, 4, 0.95) 100%);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 14px;
}

/* --- AAA SPEC BUTTONS --- */
.glass-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.glass-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.03) 100%);
  border-color: var(--border-gold-hover);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
  color: #ffffff;
}

.glass-btn:active:not(:disabled) {
  transform: scale(0.98);
  background: rgba(212, 175, 55, 0.15);
}

.glass-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.03);
  background: rgba(0, 0, 0, 0.2);
}

.glass-btn.primary {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
  border-color: var(--text-gold);
  color: var(--text-gold-light);
}

.glass-btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.1) 100%);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* --- LAYOUTS --- */
.center-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  padding: 40px;
  text-align: center;
}

/* ===== HAUPTMENÜ ===== */
#menu-container h1 {
  font-size: 2.3rem;
  margin-bottom: 2px;
}

.menu-divider {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--text-gold), transparent);
  margin: 15px auto 25px auto;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.menu-btn {
  padding: 12px 20px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
}

.menu-footer {
  margin-top: 30px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ===== OPTIONEN ===== */
.options-panel {
  width: 100%;
  margin: 20px 0;
  text-align: left;
}

.options-header {
  font-family: var(--font-title);
  color: var(--text-gold);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding-bottom: 4px;
  margin-bottom: 12px;
  font-size: 1rem;
  letter-spacing: 1px;
}

.option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ui-select {
  background: var(--bg-inner);
  border: 1px solid var(--border-gold);
  color: var(--text-light);
  padding: 5px 10px;
  border-radius: 3px;
  font-family: var(--font-body);
  outline: none;
  font-size: 0.85rem;
}

.ui-select:focus {
  border-color: var(--text-gold);
}

.btn-danger {
  border-color: rgba(184, 70, 70, 0.5);
  color: var(--color-red);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(184, 70, 70, 0.15) !important;
  border-color: var(--color-red) !important;
  box-shadow: 0 0 10px rgba(184, 70, 70, 0.3) !important;
}

/* ===== HUB ===== */
#hub-container h2 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.hub-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 210px);
  gap: 12px;
}

.hub-btn {
  flex-direction: column;
  padding: 14px;
  text-align: center;
  height: 100px;
  border-radius: 4px;
}

.hub-btn .icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.hub-btn span:nth-child(2) {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-title);
  letter-spacing: 0.5px;
}

.hub-btn .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.hub-btn.span-2 {
  grid-column: span 2;
  height: 60px;
  flex-direction: row;
  justify-content: center;
}

.hub-btn.span-2 .icon {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.hub-back-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ===== SPIEL / GAME SCREEN ===== */
#game-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  height: 95vh;
  margin: auto;
  padding: 20px;
  gap: 16px;
}

#back-to-hub-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 12px;
  font-size: 0.8rem;
  z-index: 20;
}

#game-header {
  text-align: center;
  margin-bottom: 4px;
}

#game-header h1 {
  font-size: 2rem;
  line-height: 1.1;
}

#game-header .subtitle {
  font-size: 0.85rem;
  letter-spacing: 2px;
}

/* RESOURCE BAR */
.resource-bar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  width: 100%;
}

.resource-group {
  display: flex;
  gap: 24px;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.resource-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-title);
  letter-spacing: 1px;
}

.resource-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-small {
  padding: 5px 10px;
  font-size: 0.75rem;
}

/* GATHER SECTION (Klicker Bereich) */
.gather-section {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
  width: 100%;
}

.active-gather-btn {
  height: 52px;
  font-size: 1rem;
  letter-spacing: 1px;
  border-radius: 4px;
  font-family: var(--font-title);
  text-shadow: var(--gold-glow);
}

.upgrade-btn {
  height: 52px;
  font-size: 0.85rem;
  border-radius: 4px;
}

/* PANELS GRID */
.panels-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.panel-title {
  font-family: var(--font-title);
  color: var(--text-gold);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  padding: 12px 16px;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.5px;
}

/* MITGLIEDER TABLE */
#clan-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  font-family: var(--font-title);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: normal;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 0.5px;
}

td {
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 0.85rem;
  vertical-align: middle;
}

tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: rgba(212, 175, 55, 0.03);
}

.member-name {
  font-weight: 600;
  color: var(--text-light);
}

.member-role {
  color: var(--color-blue);
  font-size: 0.8rem;
}

/* MITARBEITER FORTSCHRITTSBALKEN */
.progress-bar-container {
  position: relative;
  width: 110px;
  height: 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #aa8822 0%, #d4af37 60%, #f3e5ab 100%);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
  transform-origin: left;
  transform: scaleX(0);
}

.progress-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

/* RECRUITMENT PANEL */
#recruitment-panel {
  display: flex;
  flex-direction: column;
}

.recruit-buttons {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  flex: 1;
}

.recruit-buttons button {
  padding: 14px;
  width: 100%;
  font-size: 0.9rem;
}

/* LOG PANEL */
#log-panel {
  height: 80px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.75rem;
  overflow-y: auto;
  color: var(--text-muted);
  display: none;
}

/* GAME FOOTER */
#game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.75rem;
}

#status-display {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-running {
  background: var(--color-green);
  box-shadow: 0 0 6px var(--color-green);
}

.status-stopped {
  background: var(--color-red);
  box-shadow: 0 0 6px var(--color-red);
}

/* ==========================================================================
   OVERLAYS & MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 2, 3, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.modal-content, .modal-content-wide, .modal-content-small, .hero-modal-wide {
  position: relative;
  background: linear-gradient(135deg, rgba(16, 16, 24, 0.92) 0%, rgba(6, 6, 9, 0.98) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  box-shadow: var(--panel-shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.modal-content { width: 550px; max-height: 85vh; }
.modal-content-wide { width: 850px; max-height: 85vh; }
.modal-content-small { width: 400px; max-height: 70vh; }
.hero-modal-wide { width: 900px; max-height: 85vh; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.1rem;
  padding: 0;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--text-gold);
  margin-bottom: 10px;
  text-align: center;
}

.modal-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 8px;
}

/* TAB CONTAINER */
.tab-container {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.inv-tab-btn {
  flex: 1;
  padding: 7px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.inv-tab-btn.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--text-gold);
  color: var(--text-gold-light);
}

/* PROGRESS STYLES GENERICS */
.progress-bar-container.h-14 { height: 14px; }
.progress-bar-container.h-8 { height: 8px; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.w-100 { width: 100%; }

/* --- HERO OVERLAY --- */
.hero-split-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.hero-avatar-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-container {
  position: relative;
  width: 180px;
  height: 220px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.silhouette-svg {
  width: 80%;
  height: 90%;
}

.equip-node {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.equip-node.empty {
  background: rgba(0, 0, 0, 0.85);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.hero-details-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hero-action-buttons {
  display: flex;
  gap: 8px;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.btn-stat-add {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
}

.btn-stat-add:hover {
  background: var(--text-gold);
  color: #000;
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-align-center { display: flex; align-items: center; }
.flex-row { display: flex; flex-direction: row; }
.gap-sm { gap: 4px; }
.gap-md { gap: 10px; }
.flex-1 { flex: 1; }
.flex-1-5 { flex: 1.5; }

/* INVENTORY ROWS */
.inv-item-row {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  padding: 8px 12px;
  margin-bottom: 6px;
  transition: background 0.15s ease;
}

.inv-item-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.btn-action {
  padding: 3px 6px;
  font-size: 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-equip {
  background: rgba(92, 139, 176, 0.1);
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.btn-equip:hover {
  background: var(--color-blue);
  color: #000;
}

.btn-salvage {
  background: rgba(184, 70, 70, 0.1);
  border-color: var(--color-red);
  color: var(--color-red);
}

.btn-salvage:hover {
  background: var(--color-red);
  color: #fff;
}

/* CUSTOM TOOLTIP */
.custom-tooltip {
  position: fixed;
  display: none;
  z-index: 10000;
  pointer-events: none;
  padding: 10px 14px;
  max-width: 250px;
}

.tooltip-title {
  font-family: var(--font-title);
  font-weight: 700;
  margin-bottom: 2px;
}

.tooltip-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tooltip-stat {
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
}

/* FORGE RECIPIES SPLIT */
.forge-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.forge-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ui-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ui-card-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.ui-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ui-card-meta {
  font-size: 0.7rem;
}

.ui-btn {
  padding: 6px 10px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
}

.ui-btn:hover:not(:disabled) {
  border-color: #fff;
}

.ui-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.ui-btn-gold {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--border-gold);
  color: var(--text-gold);
}

.ui-btn-gold:hover:not(:disabled) {
  background: var(--text-gold);
  color: #000;
}

.ui-btn-blue {
  background: rgba(92, 139, 176, 0.1);
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.ui-btn-blue:hover:not(:disabled) {
  background: var(--color-blue);
  color: #000;
}

.ui-btn-red {
  background: rgba(184, 70, 70, 0.1);
  border-color: var(--color-red);
  color: var(--color-red);
}

.ui-btn-red:hover:not(:disabled) {
  background: var(--color-red);
  color: #fff;
}

/* STORY CHAPTER NAV */
.chapter-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  margin-bottom: 10px;
}

.nav-btn {
  width: 32px;
  height: 32px;
  padding: 0;
}

#story-content-area {
  position: relative;
  flex: 1;
  min-height: 180px;
  overflow-y: auto;
}

#story-locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  background: rgba(2, 2, 3, 0.8);
}

.lock-icon { font-size: 2.5rem; margin-bottom: 6px; }
.lock-text { font-family: var(--font-title); font-weight: bold; letter-spacing: 1.5px; }

.story-boss-entry {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.boss-status { font-size: 0.75rem; font-weight: bold; }
.boss-status.defeated { color: var(--color-green); }
.boss-status.current { color: var(--text-gold); text-shadow: var(--gold-glow); }
.boss-status.pending { color: var(--text-muted); }

.boss-result-box {
  padding: 8px;
  border-radius: 3px;
  font-family: var(--font-title);
  font-weight: bold;
}
.boss-result-victory { background: rgba(56, 142, 60, 0.1); border: 1px solid var(--color-green); color: var(--color-green); }
.boss-result-defeat { background: rgba(184, 70, 70, 0.1); border: 1px solid var(--color-red); color: var(--color-red); }

/* ACHIEVEMENT CARDS */
.achievement-card {
  padding: 12px;
}
.achievement-card.claimed { opacity: 0.5; }
.achievement-card.achieved { border-color: var(--text-gold); box-shadow: var(--gold-glow); }

/* TUTORIAL OVERLAY */
#tutorial-dialog {
  position: absolute;
  width: 310px;
  background: var(--bg-inner);
  border: 1px solid var(--text-gold);
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.9);
  z-index: 100000;
}

.tutorial-highlight {
  position: absolute;
  border: 2px solid var(--text-gold);
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(212,175,55,0.6), inset 0 0 10px rgba(212,175,55,0.3);
  z-index: 99999;
}

.tutorial-btn {
  background: var(--text-gold);
  border: none;
  color: #000;
  font-family: var(--font-body);
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  float: right;
}

/* QUEST TRACKER FLOATING */
.quest-tracker-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 99;
}

.quest-slide-out {
  width: 240px;
  padding: 10px 14px;
}

.quest-header {
  font-family: var(--font-title);
  color: var(--text-gold);
  font-size: 0.8rem;
  font-weight: bold;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding-bottom: 3px;
  margin-bottom: 4px;
}

.quest-text {
  font-size: 0.8rem;
  line-height: 1.35;
}

.quest-tracker-btn {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.quest-ready {
  border-color: var(--color-green) !important;
  box-shadow: 0 0 12px rgba(56, 142, 60, 0.35) !important;
}

.quest-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  padding: 10px 14px;
}

.quest-card.ready {
  border-color: var(--text-gold);
  box-shadow: var(--gold-glow);
}

.quest-card.claimed {
  opacity: 0.5;
}

.quest-btn {
  padding: 5px 10px;
  font-size: 0.75rem;
  background: var(--text-gold);
  border: none;
  color: #000;
  font-weight: bold;
  border-radius: 2px;
  cursor: pointer;
}

/* --- ANIMATIONS --- */
@keyframes epic-pulse {
  0% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.25); }
  50% { box-shadow: 0 0 18px rgba(212, 175, 55, 0.5); }
  100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.25); }
}

.epic-pulse {
  animation: epic-pulse 2s infinite ease-in-out;
}

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* FLOATING RESOURCE TEXT */
.float-text {
  position: fixed;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-gold);
  text-shadow: 0 2px 4px rgba(0,0,0,0.8), var(--gold-glow);
  pointer-events: none;
  z-index: 10000;
  animation: floatUpAndOut 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes floatUpAndOut {
  0% { transform: translateY(0) scale(0.85); opacity: 0; }
  20% { opacity: 1; transform: translateY(-8px) scale(1.05); }
  100% { transform: translateY(-60px) scale(0.9); opacity: 0; }
}

.screen-shake {
  animation: shake 0.25s ease-in-out;
}

@keyframes shake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(3px, -3px); }
  60% { transform: translate(-3px, -3px); }
  80% { transform: translate(3px, 3px); }
  100% { transform: translate(0, 0); }
}

.flash-gold {
  animation: flashGold 0.5s ease;
}

@keyframes flashGold {
  0% { background: rgba(212, 175, 55, 0); }
  30% { background: rgba(212, 175, 55, 0.15); }
  100% { background: rgba(212, 175, 55, 0); }
}

.boss-defeat-flash {
  animation: flashRed 0.5s ease;
}

@keyframes flashRed {
  0% { background: rgba(184, 70, 70, 0); }
  25% { background: rgba(184, 70, 70, 0.1); }
  100% { background: rgba(184, 70, 70, 0); }
}

/* BULK ACTIONS */
.bulk-actions-container {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 10px;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 800px) {
  #game-container {
    height: auto;
    overflow-y: auto;
    padding: 12px;
  }
  .gather-section {
    grid-template-columns: 1fr;
  }
  .panels-grid {
    grid-template-columns: 1fr;
  }
  .hub-grid {
    grid-template-columns: 1fr;
  }
  .hub-btn.span-2 {
    grid-column: span 1;
  }
  .hero-split-layout {
    grid-template-columns: 1fr;
  }
  .forge-split-layout {
    grid-template-columns: 1fr;
  }
}
