/* ===== Shadow Protocol — Screen-Specific Styles ===== */

/* ---------- Home Screen ---------- */
.home-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-lg);
  padding-top: var(--space-3xl);
}

.home-logo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 2px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  box-shadow: var(--shadow-md);
}

.home-logo svg {
  width: 56px;
  height: 56px;
}

.home-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-xl);
}

.home-actions {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--space-md);
  max-width: 340px;
}

.home-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-sm);
}

.home-nav {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-version {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.home-version .dot {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-version .dot svg {
  width: 14px;
  height: 14px;
}

/* ---------- Settings Screen ---------- */
.settings-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setting-info {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.spy-count-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--role-spy-dim);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--role-spy);
}

/* ---------- Game Setup Screen ---------- */
.setup-players {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setup-player-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.setup-player-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  flex-shrink: 0;
}

.setup-player-row .input {
  flex: 1;
}

.setup-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.setup-summary-item {
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  text-align: center;
}

.setup-summary-value {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--accent);
  font-family: var(--font-mono);
}

.setup-summary-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Pass & Play Screen ---------- */
.pass-play-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pass-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-2xl);
}

.pass-prompt-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.pass-prompt h2 {
  font-size: var(--fs-xl);
}

.pass-prompt p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.role-card {
  width: 100%;
  max-width: 320px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  text-align: center;
}

.role-card.civilian {
  background: linear-gradient(145deg, #122b1a, #0a1a10);
  border: 2px solid var(--role-civilian);
  box-shadow: 0 0 50px rgba(46, 204, 113, 0.12);
}

.role-card.spy {
  background: linear-gradient(145deg, #2b1212, #1a0a0a);
  border: 2px solid var(--role-spy);
  box-shadow: 0 0 50px rgba(231, 76, 60, 0.12);
}

.role-card.imposter {
  background: linear-gradient(145deg, #2b1e12, #1a130a);
  border: 2px solid var(--role-imposter);
  box-shadow: 0 0 50px rgba(230, 126, 34, 0.12);
}

.role-icon {
  font-size: 3rem;
}

.role-label {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: var(--fw-semibold);
}

.role-word {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}

.role-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ---------- Timer Screen ---------- */
.timer-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-xl);
}

.timer-ring {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-track {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 4;
}

.timer-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke var(--duration-fast);
}

.timer-ring-fill.urgent {
  stroke: var(--role-spy);
}

.timer-controls {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.timer-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ---------- Voting Screen ---------- */
.voting-screen {
  gap: var(--space-lg);
}

.voting-prompt {
  text-align: center;
  padding: var(--space-md) 0;
}

.voter-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.35rem 0.85rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(212, 133, 42, 0.2);
  border-radius: var(--radius-xl);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.vote-target {
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.vote-target:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.vote-target.selected {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ---------- Summary Screen ---------- */
.summary-screen {
  align-items: center;
  text-align: center;
  gap: var(--space-lg);
  padding-top: var(--space-2xl);
}

.summary-result {
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  width: 100%;
}

.summary-result.win {
  background: linear-gradient(145deg, #122b1a, #0a1a10);
  border: 2px solid var(--role-civilian);
}

.summary-result.lose {
  background: linear-gradient(145deg, #2b1212, #1a0a0a);
  border: 2px solid var(--role-spy);
}

.summary-result-icon {
  font-size: 4rem;
  margin-bottom: var(--space-sm);
}

.summary-result-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-xs);
}

.summary-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  width: 100%;
}

.summary-detail-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.summary-detail-value {
  font-weight: var(--fw-semibold);
  color: var(--accent);
}

.summary-votes {
  width: 100%;
  text-align: left;
}

.summary-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  margin-top: var(--space-md);
}

/* ---------- Library Screen ---------- */
.library-screen {
  gap: var(--space-lg);
}

.library-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.library-tab {
  flex: 1;
  padding: 0.6rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.library-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.library-category {
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.library-category:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.library-category.selected {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.library-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
}

.library-category-name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
}

.library-category-count {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.library-category-preview {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ---------- Import Screen ---------- */
.import-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.import-dropzone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.import-dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.import-dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  opacity: 0.5;
}

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .home-screen {
    padding-top: var(--space-3xl);
  }

  .role-card {
    min-height: 350px;
  }

  .timer-ring {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 380px) {
  :root {
    --fs-timer: 3.5rem;
  }

  .home-title {
    font-size: var(--fs-xl);
  }

  .role-card {
    min-height: 240px;
    padding: var(--space-lg);
  }

  .role-word {
    font-size: var(--fs-xl);
  }

  .timer-ring {
    width: 200px;
    height: 200px;
  }
}
