/* Catholic Clue: Global Stylesheet */
:root {
  --bg-dark: #12090b;
  --bg-card: #1f1013;
  --panel-bg: rgba(28, 14, 18, 0.95);
  --burgundy: #3c0919;
  --gold: #d4af37;
  --gold-accent: #d4af37;
  --gold-light: #f4e8c1;
  --gold-border: rgba(212, 175, 55, 0.5);
  --gold-glow: rgba(212, 175, 55, 0.35);
  --parchment: #f5eedc;
  --text-dark: #2b1b17;
  --scarlet: #d62828;
  --emerald: #2a9d8f;
  --royal-blue: #0077b6;
  --purple: #7209b7;
  --radius: 8px;
  --shadow: 0 8px 24px rgba(0,0,0,0.6);
}

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

body {
  font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
  background-color: var(--bg-dark);
  color: var(--gold-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Hub Landing Page & Modes Grid (Uno Style)
   ========================================================================== */
.hero-panel {
  max-width: 880px;
  margin: 30px auto;
  background: rgba(28, 14, 18, 0.95);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 35px 30px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.9), 0 0 30px var(--gold-glow);
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold-glow);
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.hero-subtitle {
  color: #f4e8c1;
  font-size: 1.15rem;
  font-style: italic;
  margin-bottom: 24px;
}

/* Suspects Showcase Grid */
.suspects-showcase {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 20px 0;
}

@media (max-width: 700px) {
  .suspects-showcase {
    grid-template-columns: repeat(3, 1fr);
  }
}

.suspect-mini-card {
  background: rgba(10, 5, 7, 0.8);
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.suspect-mini-icon { font-size: 1.6rem; }
.suspect-mini-name { font-size: 0.75rem; font-weight: bold; margin-top: 4px; }

/* Input Form Row */
.hub-form-row {
  display: flex;
  gap: 16px;
  margin: 20px 0 25px 0;
  text-align: left;
}

@media (max-width: 600px) {
  .hub-form-row { flex-direction: column; }
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: linear-gradient(135deg, #4a0012, #2b000a);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 1.1rem;
}

.icon-btn:hover {
  border-color: #fff;
  transform: scale(1.05);
}

/* Modes Grid */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.mode-card {
  background: linear-gradient(145deg, rgba(45, 15, 25, 0.9), rgba(20, 8, 12, 0.95));
  border: 2px solid var(--gold-border);
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mode-card:hover {
  border-color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--gold-glow);
}

.mode-icon { font-size: 2.3rem; margin-bottom: 8px; }
.mode-title { font-size: 1.05rem; font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.mode-desc { font-size: 0.8rem; color: #ccc; line-height: 1.35; font-family: 'Inter', sans-serif; margin-bottom: 14px; }

/* Buttons */
.btn {
  background: linear-gradient(185deg, #800020, #4a0012);
  color: var(--gold-light);
  border: 1px solid var(--gold);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:hover {
  background: linear-gradient(185deg, #a00028, #600018);
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.btn-gold {
  background: linear-gradient(185deg, #d4af37, #9a781b);
  color: #12090b;
  border-color: #ffe57f;
}

.btn-gold:hover {
  background: linear-gradient(185deg, #ffe57f, #d4af37);
  color: #000;
}

.btn-secondary {
  background: #2b181c;
  border-color: #6a4049;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(80%);
}

/* Header & Badges */
.app-header {
  background: var(--burgundy);
  border-bottom: 2px solid var(--gold);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--gold);
  letter-spacing: 1px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--gold-light);
  font-style: italic;
  display: block;
}

.header-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.room-badge {
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.85rem;
}

.room-badge-btn {
  background: rgba(46, 125, 50, 0.4);
  border-color: #4caf50;
  color: #a5d6a7;
}

/* ==========================================================================
   Host TV Layout
   ========================================================================== */
.host-main-layout {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 16px;
  padding: 16px;
  flex: 1;
}

@media (max-width: 1100px) {
  .host-main-layout {
    grid-template-columns: 1fr;
  }
}

.host-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-card {
  background: var(--panel-bg);
  border: 2px solid var(--gold-border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.panel-title {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--gold-border);
  padding-bottom: 6px;
}

.qr-share-box {
  background: rgba(0,0,0,0.5);
  border: 1px dashed var(--gold-border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 6px 0;
}

.lobby-players-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.lobby-player-card {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.host-center-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.turn-banner-host {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
  margin-bottom: 10px;
  text-align: center;
}

.board-canvas-wrapper {
  background: #000;
  border: 3px solid var(--gold);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px var(--gold-glow);
}

#clue-board {
  display: block;
  max-width: 100%;
  height: auto;
}

.action-log-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}

.log-entry {
  background: rgba(0,0,0,0.3);
  border-left: 3px solid var(--gold);
  padding: 6px 8px;
  border-radius: 4px;
  line-height: 1.35;
}

.log-time {
  color: #888;
  font-size: 0.75rem;
  margin-right: 6px;
}

/* ==========================================================================
   Mobile Phone Controller Layout
   ========================================================================== */
.controller-body {
  background: #14090b;
}

.controller-header {
  background: var(--burgundy);
  border-bottom: 2px solid var(--gold);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.controller-main {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.controller-card {
  background: var(--panel-bg);
  border: 2px solid var(--gold-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.ctl-turn-card {
  background: rgba(30, 15, 20, 0.95);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  color: var(--gold);
  box-shadow: 0 0 15px var(--gold-glow);
}

.ctl-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ctl-destinations-box {
  background: rgba(0,0,0,0.6);
  border: 2px dashed var(--gold);
  border-radius: 8px;
  padding: 10px;
}

.btn-move-option {
  background: linear-gradient(135deg, #2a9d8f, #1b635a);
  color: #fff;
  border-color: #64dfdf;
  font-size: 0.85rem;
  padding: 8px 12px;
}

.btn-move-small {
  font-size: 0.75rem;
  padding: 4px 8px;
}

.ctl-hand-section {
  background: var(--panel-bg);
  border: 1px solid var(--gold-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.ctl-hand-flex {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.ctl-hand-card {
  background: #f5eedc;
  color: #2b1b17;
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 100px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.ctl-hand-card .card-icon { font-size: 1.4rem; }
.ctl-hand-card .card-name { font-size: 0.75rem; font-weight: bold; margin-top: 4px; }

/* Detective Sheet */
.ctl-sheet-section {
  background: #f5eedc;
  color: #2b1b17;
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.detective-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.detective-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #d4c8b0;
}

.sheet-check-btn {
  width: 32px;
  height: 26px;
  border: 1px solid #888;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.sheet-check-btn.checked-no { background: #ffebee; color: #d32f2f; border-color: #d32f2f; }
.sheet-check-btn.checked-yes { background: #e8f5e9; color: #2e7d32; border-color: #2e7d32; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-card {
  background: #2b161b;
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.9);
}

.form-group { margin-bottom: 12px; }
.form-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--gold-border);
  background: #14090b;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
}

.hidden { display: none !important; }
