/* ==========================================================================
   Dramatic Diplomacy — Visual Styling (style.css)
   Palette: Cathay Pacific Inspired (Jade Teal, Charcoal, Black, & Grey)
   ========================================================================== */

/* 1. Global Resets & Variables */
:root {
  /* Cathay Pacific Brand Inspired Colors */
  --cathay-teal: #006564;        /* Iconic Cathay Brushwing Teal */
  --cathay-teal-hover: #004d4c;
  --cathay-black: #111417;       /* Primary dark background */
  --cathay-charcoal: #1c2226;    /* Surface cards & panels */
  --cathay-slate: #2a333a;       /* Borders & secondary containers */
  
  --text-main: #f1f5f9;          /* Crisp off-white text */
  --text-muted: #94a3b8;         /* Soft grey for secondary details */
  --text-dark: #0f172a;
  
  --accent-red: #dc2626;         /* Incident / Blockade failure alert */
  --accent-gold: #c59b27;        /* Substage highlights */
  
  --font-mono: "Courier New", Courier, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--cathay-black);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* 2. Header & Tour Tracker */
.game-header {
  width: 100%;
  max-width: 1000px;
  background-color: var(--cathay-charcoal);
  border: 1px solid var(--cathay-slate);
  border-top: 4px solid var(--cathay-teal); /* Signature Teal Header Trim */
  border-radius: 8px;
  padding: 24px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo-title {
  text-align: center;
}

.logo-title h1 {
  font-size: 1.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
}

.logo-title .subtitle {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--cathay-teal);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.tour-tracker {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.tour-badge {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  border: 1px solid var(--cathay-slate);
  border-radius: 4px;
  background-color: var(--cathay-black);
  color: var(--text-muted);
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.tour-badge.active {
  background-color: var(--cathay-teal);
  color: #ffffff;
  font-weight: bold;
  border-color: var(--cathay-teal);
}

.tour-badge.completed {
  background-color: var(--cathay-slate);
  color: var(--text-main);
  border-color: var(--cathay-teal);
}

.tour-badge.locked {
  opacity: 0.4;
}

/* 3. Game Screens & Containers */
.game-container {
  width: 100%;
  max-width: 1000px;
}

.game-screen {
  background-color: var(--cathay-charcoal);
  border: 1px solid var(--cathay-slate);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.hidden {
  display: none !important;
}

/* 4. Typography & Buttons */
h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--cathay-slate);
  padding-bottom: 8px;
  color: #ffffff;
}

p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* High-Impact Prompt Callout Line (Twice standard text size with Cathay Teal glow) */
.prompt-callout {
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin: 24px 0;
  text-shadow: 0 0 12px rgba(0, 101, 100, 0.45);
  letter-spacing: 0.3px;
}

button {
  cursor: pointer;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;

  display: block;          
  margin-left: auto;
  margin-right: auto;
  margin-top: 28px;        
  text-align: center;
}

.btn-primary {
  background-color: var(--cathay-teal);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--cathay-teal-hover);
}

.btn-success {
  background-color: var(--cathay-teal);
  color: #ffffff;
  border: 1px solid var(--cathay-teal);
  max-width: 400px;        
  width: 100%;
}

.btn-success:hover {
  background-color: var(--cathay-teal-hover);
}

/* 5. Stage Specific Styles */

/* Territory List (Stage 2) */
.territory-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  width: 100%;
}

/* Territory Item & Sub-box */
.territory-item {
  list-style: none;
  margin-bottom: 10px;
  cursor: pointer;
}

.territory-title {
  display: block;
  padding: 10px 15px;
  background: var(--cathay-slate);
  color: #fff;
  border: 1px solid #3a4650;
  border-radius: 4px;
  font-weight: bold;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: center;
  text-transform: uppercase;
  transition: all 0.2s ease-in-out;
}

.territory-item:hover .territory-title,
.territory-item.active .territory-title {
  background: var(--cathay-teal);
  border-color: var(--cathay-teal);
}

.territory-subbox {
  margin-top: 5px;
  padding: 12px 15px;
  background: var(--cathay-black);
  border-left: 3px solid var(--cathay-teal);
  color: var(--text-main);
  font-size: 0.9em;
  border-radius: 0 0 4px 4px;
  line-height: 1.5;
}

/* Selection Counter Indicator (Stage 3) */
.selection-counter {
  background-color: var(--cathay-black);
  border: 1px solid var(--cathay-slate);
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  display: inline-block;
  color: var(--cathay-teal);
}

/* Gallery Grid (Stage 3) */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.art-card {
  background-color: var(--cathay-black);
  border: 2px solid var(--cathay-slate);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.art-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
}

.art-card.selected {
  border-color: var(--cathay-teal);
  background-color: #0b1a19; /* Subtle teal tint on selection */
}

/* Ensured paintings fit without awkward cropping */
.art-card img {
  width: 100%;
  height: 130px;
  object-fit: contain; 
  border-radius: 4px;
  background-color: #050505;
  margin-bottom: 8px;
}

.art-card span {
  display: block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Framing Form */
.framing-section {
  background-color: var(--cathay-black);
  padding: 20px;
  border-radius: 6px;
  border: 1px solid var(--cathay-slate);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  background-color: var(--cathay-charcoal);
  border: 1px solid var(--cathay-slate);
  border-radius: 4px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--cathay-teal);
}

/* 6. Results & Failure Overlay */
.result-card {
  text-align: center;
}

.reveal-box {
  background-color: var(--cathay-black);
  border: 1px dashed var(--cathay-slate);
  padding: 20px;
  border-radius: 6px;
  margin: 20px 0;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.result-card.failure h2 {
  color: var(--accent-red);
}

.result-card.success h2 {
  color: var(--cathay-teal);
}

/* ==========================================================================
   7. About the Game Card & Archival Credits (Intro Screen)
   ========================================================================== */
.about-game-card {
  margin-top: 40px; /* Separates the card cleanly from the welcome briefing above */
  background-color: var(--cathay-black);
  border: 1px solid var(--cathay-teal); /* Cathay Teal Accent Border */
  border-radius: 8px;
  padding: 24px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.about-game-card h3 {
  color: var(--cathay-teal);
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(0, 101, 100, 0.4);
  padding-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-game-card p {
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.archival-credits h4 {
  color: #58a6ff;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.archival-credits ul {
  list-style-type: square;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.archival-credits li {
  margin-bottom: 6px;
}

.archival-credits li strong {
  color: var(--text-main);
}

.copyright-disclaimer {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
  margin-bottom: 0 !important;
}