:root {
  --bg: #000000;
  --card-bg: #111111;
  --primary: #ffffff;
  --primary-soft: #2a2a2a;
  --text-main: #ffffff;
  --text-muted: #b8b8b8;
  --border-soft: #2c2c2c;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.55);

  --radius-card: 32px;
  --radius-pill: 999px;
  --radius-button: 999px;

  --transition-fast: 0.18s ease-out;

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}
html { font-size: 135%; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------
   HOME SCREEN — TRUE VERTICAL LIST
--------------------------------------------------- */

.home-list {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Medium spacing */
  margin-top: 12px;
}

.list-card {
  background: var(--card-bg);
  border: 1px solid #ffffff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 150px; /* Large premium cards */
}

.list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7);
}

.list-icon {
  margin-bottom: 12px;
}

.list-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.list-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------
   TIMER SCREEN
--------------------------------------------------- */

.hidden {
  display: none !important;
}

.timer-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.back-button {
  border: none;
  background: #ffffff;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: #000000;
  border-radius: 50%;
}

.icon-button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #ffffff;
  width: auto;
  height: auto;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
  font-size: 1.1rem;
}

.timer-title {
  margin: 0;
  font-size: 1.1rem;
}

/* ---------------------------------------------------
   TIMER CARD
--------------------------------------------------- */

.timer-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 24px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  align-items: center;
}

/* ---------------------------------------------------
   HERO CIRCLE TIMER
--------------------------------------------------- */

.circle-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-timer {
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: #2a2a2a;
  stroke-width: 8;
}

.circle-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283; /* 2πr for r=45 */
  stroke-dashoffset: 0;
  transition: none;
}

.circle-time {
  position: absolute;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ---------------------------------------------------
   TIMER LABELS & INFO
--------------------------------------------------- */

.timer-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  min-height: 18px;
}

.timer-subinfo {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 18px;
}

/* ---------------------------------------------------
   CONTROLS
--------------------------------------------------- */

.timer-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.timer-extra {
  flex: 1;
  overflow-y: auto;
  padding-top: 8px;
  width: 100%;
  border-top: 1px solid var(--border-soft);
}

/* ---------------------------------------------------
   LISTS
--------------------------------------------------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #2c2c2c;
  font-size: 0.9rem;
}

.list-item-label {
  color: var(--text-main);
}

.list-item-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------------------------------------------------
   BUTTONS
--------------------------------------------------- */

.btn {
  border: none;
  border-radius: var(--radius-button);
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn.primary {
  background: var(--primary);
  color: #000000;
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.18);
}

.btn.secondary {
  background: #2a2a2a;
  color: var(--text-main);
}

.btn.ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn.full {
  width: 100%;
}

/* ---------------------------------------------------
   MODAL
--------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.modal {
  background: var(--card-bg);
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.modal-header {
  margin-bottom: 12px;
}

.modal-title {
  margin: 0;
  font-size: 1.1rem;
}

.modal-body {
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Inputs */
.field {
  margin-bottom: 16px;
}

.field-label {
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: block;
}

.field-row {
  display: flex;
  gap: 8px;
}

input[type="number"],
input[type="text"],
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  font-size: 1rem;
  font-family: var(--font-main);
  background: #000000;
  color: var(--text-main);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---------------------------------------------------
   BRAND FOOTER
--------------------------------------------------- */
.brand-footer {
  margin-top: auto;
  padding: 14px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.brand-url {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
}
