/* ============================================================
   MASTERCLASS SLIDES — Scanderia
   ============================================================ */

:root {
  --blue: #1A3A5C;
  --accent: #2E86AB;
  --light: #E8F1F8;
  --dark: #0D1B2A;
  --gold: #D4A843;
  --green: #2E7D32;
  --orange: #E65100;
  --red: #C62828;
  --white: #FFFFFF;
  --gray: #F5F5F0;
  --text: #1A1A1A;

  --command: #5B8FB9;
  --growth: #2E86AB;
  --revenue: #D4A843;
  --build: #5C6BC0;
  --shield: #2E7D32;
}

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

html, body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--dark);
  color: var(--slide-text);
  overflow: hidden;
  height: 100%;
}

/* --- Dark mode (default for evening presentation) --- */
:root {
  --slide-bg: #0D1B2A;
  --slide-text: #E8E8E8;
  --slide-h2: #5DADE2;
  --slide-h3: #85C1E9;
  --slide-table-head: #1A3A5C;
  --slide-table-alt: rgba(255,255,255,0.04);
  --slide-table-border: rgba(255,255,255,0.1);
  --slide-card-bg: rgba(255,255,255,0.06);
  --slide-code-bg: rgba(255,255,255,0.08);
  --slide-note-bg: rgba(255,255,255,0.06);
  --slide-highlight-bg: rgba(46,134,171,0.15);
  --slide-highlight-border: var(--accent);
  --slide-warning-bg: rgba(230,81,0,0.12);
  --slide-warning-border: var(--orange);
  --slide-tip-bg: rgba(46,125,50,0.12);
  --slide-tip-border: var(--green);
  --slide-prompt-bg: rgba(255,255,255,0.06);
  --slide-placeholder-bg: rgba(255,255,255,0.04);
  --slide-placeholder-border: rgba(46,134,171,0.4);
  --slide-counter-color: rgba(255,255,255,0.3);
}

/* Light mode toggle (press L) */
body.light-mode {
  --slide-bg: #FFFFFF;
  --slide-text: #1A1A1A;
  --slide-h2: #1A3A5C;
  --slide-h3: #2E86AB;
  --slide-table-head: #1A3A5C;
  --slide-table-alt: #F5F5F0;
  --slide-table-border: #E0E0E0;
  --slide-card-bg: #F5F5F0;
  --slide-code-bg: #F5F5F0;
  --slide-note-bg: #F5F5F0;
  --slide-highlight-bg: #E8F1F8;
  --slide-highlight-border: #2E86AB;
  --slide-warning-bg: #FFF3E0;
  --slide-warning-border: #E65100;
  --slide-tip-bg: #E8F5E9;
  --slide-tip-border: #2E7D32;
  --slide-prompt-bg: #F5F5F0;
  --slide-placeholder-bg: #F5F5F0;
  --slide-placeholder-border: #2E86AB;
  --slide-counter-color: #999;
}

/* --- Slide base --- */
.slide {
  width: 100vw;
  height: 100vh;
  padding: 60px 80px;
  display: none;
  flex-direction: column;
  justify-content: center;
  background: var(--slide-bg);
  color: var(--slide-text);
  position: relative;
}

.slide.active {
  display: flex;
}

/* --- Cover slides --- */
.slide-cover {
  background: linear-gradient(135deg, var(--dark) 0%, var(--blue) 100%);
  color: var(--white);
  text-align: center;
}

.slide-cover h1 {
  font-size: 4em;
  line-height: 1.15;
  margin-bottom: 0.3em;
  color: var(--white);
}

.cover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.subtitle {
  font-size: 1.4em;
  color: var(--accent);
  font-weight: 300;
}

.slide-cover .subtitle {
  color: rgba(255,255,255,0.75);
}

.authors {
  margin-top: 40px;
  font-size: 1.2em;
}

.event {
  color: var(--gold);
  font-weight: 600;
}

/* --- Section dividers --- */
.slide-section {
  background: var(--blue);
  color: var(--white);
  text-align: center;
}

.slide-section h1 {
  font-size: 3.5em;
  line-height: 1.2;
  color: var(--white);
}

.slide-section .subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 1.5em;
}

/* --- Typography --- */
h2 {
  font-size: 2.2em;
  color: var(--slide-h2);
  margin-bottom: 30px;
  line-height: 1.2;
}

h3 {
  font-size: 1.3em;
  color: var(--slide-h3);
  margin-bottom: 15px;
}

p {
  font-size: 1.15em;
  line-height: 1.6;
  margin-bottom: 10px;
}

.center {
  text-align: center;
}

.small {
  font-size: 0.85em;
  color: rgba(255,255,255,0.5);
}

body.light-mode .small {
  color: #999;
}

/* --- Lists --- */
ul, ol {
  font-size: 1.2em;
  line-height: 1.8;
  padding-left: 1.5em;
}

.big-list {
  font-size: 1.4em;
  columns: 2;
  column-gap: 60px;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05em;
  margin: 20px 0;
}

th {
  background: var(--slide-table-head);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--slide-table-border);
}

tr:nth-child(even) td {
  background: var(--slide-table-alt);
}

/* --- Cards --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}

.card {
  background: var(--slide-card-bg);
  border-radius: 12px;
  padding: 24px;
  border-left: 4px solid var(--accent);
}

.card-green {
  border-left-color: var(--green);
  background: var(--slide-tip-bg);
}

.card-red {
  border-left-color: var(--red);
  background: rgba(198,40,40,0.1);
}

/* --- Big quotes --- */
.bigquote {
  font-size: 1.8em;
  line-height: 1.4;
  color: var(--slide-h2);
  text-align: center;
  padding: 40px;
  border-left: 6px solid var(--accent);
  background: var(--slide-highlight-bg);
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
}

/* --- Phases --- */
.phases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.phase {
  text-align: center;
  padding: 20px;
  background: var(--slide-card-bg);
  border-radius: 12px;
}

.phase-num {
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
  margin: 0 auto 12px;
}

/* --- Flow --- */
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
}

.flow-step {
  background: var(--accent);
  color: var(--white);
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1em;
}

.flow-arrow {
  font-size: 2em;
  color: var(--accent);
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9em;
}

.badge.green { background: var(--green); }
.badge.blue { background: var(--accent); }
.badge.orange { background: var(--orange); }
.badge.red { background: var(--red); }

/* --- Roles grid --- */
.roles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.role-tag {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95em;
}

.role-tag.command { background: var(--command); }
.role-tag.growth { background: var(--growth); }
.role-tag.revenue { background: var(--revenue); color: var(--dark); }
.role-tag.build { background: var(--build); }
.role-tag.shield { background: var(--shield); }

/* --- Squad colors in tables --- */
.squad-command { color: var(--command); font-weight: 700; }
.squad-growth { color: var(--growth); font-weight: 700; }
.squad-revenue { color: var(--revenue); font-weight: 700; }
.squad-build { color: var(--build); font-weight: 700; }
.squad-shield { color: var(--shield); font-weight: 700; }

/* --- Connector grid --- */
.connector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.connector {
  background: var(--slide-card-bg);
  border: 1px solid var(--accent);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.95em;
  color: var(--slide-h2);
}

/* --- Boxes --- */
.highlight-box {
  background: var(--slide-highlight-bg);
  border: 2px solid var(--slide-highlight-border);
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
}

.warning-box {
  background: var(--slide-warning-bg);
  border-color: var(--slide-warning-border);
}

.tip-box {
  background: var(--slide-tip-bg);
  border: 2px solid var(--slide-tip-border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.note {
  background: var(--slide-note-bg);
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
  font-size: 0.95em;
}

.prompt-box {
  background: var(--slide-prompt-bg);
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  font-family: 'Courier New', monospace;
  font-size: 1.2em;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  position: relative;
}

.prompt-box .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.6em;
  font-family: 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
.prompt-box .copy-btn:hover {
  background: rgba(255,255,255,0.3);
}
.prompt-box .copy-btn.copied {
  background: #4CAF50;
  border-color: #4CAF50;
}

.placeholder {
  background: var(--slide-placeholder-bg);
  border: 2px dashed var(--slide-placeholder-border);
  border-radius: 12px;
  padding: 60px;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 1.1em;
}

code {
  background: var(--slide-code-bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* --- Price box --- */
.price-box {
  text-align: center;
  margin: 30px 0;
}

.price {
  font-size: 5em;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.price-label {
  font-size: 1.5em;
  color: #666;
}

/* --- Cost colors --- */
.cost-high { color: var(--red); font-weight: 700; }
.cost-med { color: var(--orange); font-weight: 700; }
.cost-low { color: var(--green); font-weight: 700; }
.cost-free { color: var(--green); font-weight: 700; }

/* --- Slide counter --- */
.slide-counter {
  position: fixed;
  bottom: 20px;
  right: 30px;
  font-size: 0.9em;
  color: var(--slide-counter-color);
  z-index: 100;
}

/* --- Keyboard hint --- */
.keyboard-hint {
  position: fixed;
  bottom: 20px;
  left: 30px;
  font-size: 0.8em;
  color: var(--slide-counter-color);
  z-index: 100;
}

/* --- Mode indicator --- */
.mode-indicator {
  position: fixed;
  top: 15px;
  right: 20px;
  font-size: 0.75em;
  color: var(--slide-counter-color);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
}

.mode-indicator.show {
  opacity: 1;
}

/* --- Print --- */
@media print {
  .slide {
    display: flex !important;
    page-break-after: always;
    height: auto;
    min-height: 100vh;
  }
  .slide-counter, .keyboard-hint { display: none; }
}
