@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800;900&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --font-display: 'Outfit', sans-serif;
  --font-timer: 'Orbitron', sans-serif;
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --panel-bg: #1e293b;
  --border-color: #334155;
  --btn-default: #334155;
  --btn-start: #0f766e;
  --btn-pause: #b45309;
  --btn-reset: #be123c;
}

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

body {
  font-family: var(--font-display);
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* ==========================================================================
   Main Display Screen Styling (index.html)
   ========================================================================== */

.screen-container {
  width: 100%;
  max-width: 1600px;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.display-container {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.3s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timer-box {
  z-index: 10;
  pointer-events: none;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  margin: 0;
  width: 760px; /* Fixed width to keep the left edge anchored standard MM:SS text box */
  display: flex;
  justify-content: flex-start;
}

.timer-box.format-ms {
  width: 1140px; /* Fixed width to keep the left edge anchored high-res MM:SS.ms text box */
}

.timer-number {
  font-family: var(--font-timer);
  font-size: 13.5rem;
  font-weight: 900;
  line-height: 1;
  color: #000000; /* Black font color */
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
  transform: translateY(35px); /* Centered nicely inside the white rectangle */
  text-align: left; /* Left-aligned to prevent layout jitter from digit width variations */
  width: 100%;
}

.timer-number.format-ms {
  font-size: 11.5rem;
  transform: translateY(35px);
}

.timer-number.urgent {
  color: #dc2626 !important;
}

/* Floating settings button on main display - bottom right */
.settings-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid #334155;
  color: var(--text-color);
  font-size: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.settings-btn:hover {
  background: #334155;
  border-color: #64748b;
  transform: rotate(45deg);
}


/* ==========================================================================
   Configurator Page Styling (config.html)
   ========================================================================== */

.config-body {
  background: #0f172a;
  overflow-y: auto;
  padding: 24px;
  height: auto;
  min-height: 100vh;
  display: block;
}

.dashboard {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
}

.status-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Control Layouts */
.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .control-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Custom Select, Input */
select, input[type="number"] {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #f8fafc;
  padding: 8px 12px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font-display);
}

select:focus, input[type="number"]:focus {
  border-color: #64748b;
}

/* Big Action Buttons Row */
.big-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-big {
  padding: 16px;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s;
}

.btn-start {
  background: var(--btn-start);
  color: #fff;
}

.btn-start:hover {
  background: #0d9488;
}

.btn-pause {
  background: var(--btn-pause);
  color: #fff;
}

.btn-pause:hover {
  background: #d97706;
}

.btn-reset {
  background: var(--btn-reset);
  color: #fff;
}

.btn-reset:hover {
  background: #e11d48;
}

/* Adjustments Grid */
.adjustments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.btn-adjust {
  background: #334155;
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-adjust:hover {
  background: #475569;
}

/* Background Select & Format Select Visual Options */
.visual-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.visual-option {
  position: relative;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  transition: border-color 0.2s;
}

.visual-option.selected {
  border-color: #64748b;
  background: #1e293b;
}

.visual-option input[type="radio"] {
  position: absolute;
  top: 8px;
  right: 8px;
  accent-color: #64748b;
}

.bg-thumbnail {
  width: 100%;
  height: 60px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  border: 1px solid #334155;
}

.visual-option span {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Custom time input row */
.time-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-picker-row span {
  font-weight: 500;
  color: #64748b;
  font-size: 0.9rem;
}

.time-picker-row input {
  width: 80px;
  padding: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
}

.btn-adjust.btn-adjust-plus {
  background: var(--btn-start);
  color: #ffffff;
  border-color: #0d9488;
}

.btn-adjust.btn-adjust-plus:hover {
  background: #0d9488;
}

.btn-adjust.btn-adjust-minus {
  background: var(--btn-reset);
  color: #ffffff;
  border-color: #e11d48;
}

.btn-adjust.btn-adjust-minus:hover {
  background: #e11d48;
}
