.tpsc-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1rem;
}

.tpsc-wrap {
  width: 100%;
}

.tpsc-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .tpsc-grid {
    grid-template-columns: 1fr;
  }
}

.tpsc-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tpsc-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--text, #1e293b);
}

.tpsc-form-group {
  margin-bottom: 1.25rem;
}

.tpsc-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tpsc-col {
  flex: 1;
}

.tpsc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.tpsc-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin-bottom: 0.35rem;
}

.tpsc-btn-ghost {
  background: transparent;
  color: #0284c7;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.tpsc-btn-ghost:hover {
  background: #f0f9ff;
}

.tpsc-input,
.tpsc-select,
.tpsc-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text, #1e293b);
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  box-sizing: border-box;
  font-family: inherit;
}

.tpsc-textarea {
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

.tpsc-input:focus,
.tpsc-select:focus,
.tpsc-textarea:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* KPI Cards */
.tpsc-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tpsc-kpi-card {
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.tpsc-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.tpsc-kpi-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tpsc-kpi-sub {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.tpsc-kpi-duration {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.tpsc-kpi-words {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.tpsc-kpi-speed {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.tpsc-kpi-paras {
  background: #faf5ff;
  border: 1px solid #f3e8ff;
  color: #7e22ce;
}

/* Prompter Simulator */
.tpsc-prompter-box {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.tpsc-prompter-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.tpsc-btn-ctrl {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}

.tpsc-btn-ctrl:hover {
  background: #334155;
}

.tpsc-font-size-ctrl {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}

.tpsc-fs-label {
  color: #94a3b8;
  font-size: 0.8rem;
}

.tpsc-btn-fs {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
}

.tpsc-stage-viewport {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 1.5rem 1.25rem;
}

.tpsc-guide-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(239, 68, 68, 0.4);
  pointer-events: none;
  z-index: 2;
}

.tpsc-stage-content {
  position: relative;
  top: 0;
  color: #f8fafc;
  font-size: 1.25rem;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: center;
}

.tpsc-stage-content p {
  margin-bottom: 1.5rem;
}

.tpsc-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tpsc-btn-action {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.tpsc-btn-action:hover {
  background: #0369a1;
}

.tpsc-status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #16a34a;
}

/* Fullscreen Prompter Mode */
.tpsc-prompter-box.tpsc-fullscreen,
.tpsc-prompter-box:fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  z-index: 999999 !important;
  border-radius: 0 !important;
  padding: 2rem !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: #090d16 !important;
}

.tpsc-prompter-box.tpsc-fullscreen .tpsc-stage-viewport,
.tpsc-prompter-box:fullscreen .tpsc-stage-viewport {
  flex: 1 1 auto !important;
  height: calc(100vh - 120px) !important;
  font-size: 2.25rem !important;
  line-height: 1.6 !important;
}

.tpsc-prompter-box.tpsc-fullscreen .tpsc-prompter-controls,
.tpsc-prompter-box:fullscreen .tpsc-prompter-controls {
  padding-bottom: 1rem;
}
