/* ---------------- BASE ---------------- */
body {
  margin: 0; padding: 10px;
  background: transparent;
  font-family: 'Satoshi', sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 100vh;
}

/* ---------------- BUILDER ---------------- */
.builder-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ---------------- HEADER ---------------- */
.widget-header {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.6px;

  padding: 8px 16px;
  border-radius: 999px;

  background: linear-gradient(
    to right,
    rgba(255,255,255,0.9),
    rgba(255,255,255,0.7)
  );

  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);

  color: #444;
  text-align: center;

  margin-bottom: 8px;
}

/* ---------------- TIP ---------------- */
.usage-tip {
  font-size: 12px;
  line-height: 1.4;

  width: 260px;

  background: rgba(255,255,255,0.75);

  padding: 14px;
  border-radius: 16px;

  box-shadow: 0 10px 24px rgba(0,0,0,0.08);

  text-align: center;
}

/* ---------------- CONTROLS ---------------- */
.top-left-controls {
  display: flex;
  gap: 12px;
  margin: 10px 0;
}

/* ---------------- BUTTONS ---------------- */
.btn {
  width: 56px;
  height: 56px;

  border-radius: 18px;

  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);

  box-shadow: 0 10px 22px rgba(0,0,0,0.08);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  transition: transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.05);
}

/* ✏️ edit button */
.edit-btn {
  font-size: 18px;
}

.theme-btn {
  width: 20px;
  height: 20px;

  border-radius: 50%;

  background-color: #f4dfeb; /* ALWAYS pink */
  border: 2px solid white;

  box-sizing: border-box;

  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 🔤 font button */
.font-toggle-btn {
  font-size: 13px;
}

/* ---------------- POPUP ---------------- */
.sign-popup {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 12px;

  padding: 16px;
  border-radius: 18px;

  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);

  box-shadow: 0 18px 40px rgba(0,0,0,0.12);

  z-index: 20;
}

.sign-title {
  font-size: 11px;
  opacity: 0.6;
  text-transform: lowercase;
}

/* ---------------- INPUTS ---------------- */
/* ✨ aesthetic date inputs */
.input-group input[type="date"],
.input-group input[type="text"] {
  padding: 8px;
  border-radius: 12px;

  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.85);

  font-size: 12px;
  text-align: center;

  box-shadow: 0 4px 10px rgba(0,0,0,0.05);

  transition: all 0.2s ease;
}

/* ✏️ tiny soft labels */
.input-group label {
  font-size: 9px;
  opacity: 0.55;

  letter-spacing: 0.4px;
  text-transform: lowercase;

  margin-bottom: 2px;

  transition: opacity 0.2s ease;
}

/* glow slightly when input is active */
.input-group:focus-within label {
  opacity: 0.85;
}
/* focus glow */
.input-group input:focus {
  outline: none;
  border-color: #f9d5d3;

  box-shadow:
    0 0 0 3px rgba(249, 213, 211, 0.3),
    0 6px 14px rgba(0,0,0,0.08);
}

/* hover */
.input-group input:hover {
  transform: scale(1.02);
}

/* ---------------- ICON GRID ---------------- */
.icon-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.icon-title {
  font-size: 10px;
  opacity: 0.6;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* instead of 4 */
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
}

.icon-option {
  width: 28px;
  height: 28px;

  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #ffffff;

  border: 1px solid rgba(0,0,0,0.06);

  cursor: pointer;

  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.icon-option img {
  width: 22px;
  height: 22px;

  pointer-events: none;
}
.icon-option:hover {
  transform: scale(1.12);

  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
.countdown-icon {
  width: 39px;
  height: 39px;
}

/* OVERRIDE FOR WIDE ICON */
.countdown-icon.icon-wide {
  width: 72px;
  height: auto;
}

/* ---------------- THEME CIRCLES ---------------- */
.themes-row {
  display: flex;
  gap: 10px;
}

.theme-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;

  cursor: pointer;
}

.theme-circle.pink { background: #f4dfeb; }
.theme-circle.beige { background: #faebdd; }
.theme-circle.blue { background: #ddebf1; }
.theme-circle.green { background: #ddedea; }
.theme-circle.black { background: #17171a; }
.theme-circle.white { background: #f8f6f3; border: 1px solid rgba(0,0,0,0.08); }

/* ---------------- FONT OPTIONS ---------------- */
.font-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.font-option {
  font-size: 12px;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;

  background: rgba(255,255,255,0.6);
}

.font-option:hover {
  transform: scale(1.05);
}

/* ---------------- WIDGET ---------------- */
.widget {
  width: 220px;
  height: 140px;

  padding: 12px;
  border-radius: 22px;

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  box-shadow:
    0 12px 30px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

/* THEMES */
.widget.pink { background-color: #f4dfeb; color: #60355c; }
.widget.beige { background-color: #faebdd; color: #5d4c3a; }
.widget.blue { background-color: #ddebf1; color: #4b5c74; }
.widget.green { background-color: #ddedea; color: #5b6c5a; }
.widget.black { background-color: #17171a; color: #f5f3f1; }
.widget.white { background-color: #f8f6f3; color: #252225; }


/* ---------------- CONTENT ---------------- */
.widget-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ICON */
.countdown-icon {
  font-size: 18px;
}

/* TITLE */
.widget-title {
  font-size: 12px;
  opacity: 0.7;
}

/* LINE */
.divider-line {
  width: 60%;
  height: 1px;
  background: rgba(0,0,0,0.15);
  margin: 0 auto;
}

/* MAIN TEXT */
#countdownText {
  font-size: 14px;
  font-weight: 600;
}

/* RANGE */
#dateRange {
  font-size: 10px;
  opacity: 0.6;
}

/* ---------------- COPY ---------------- */
.setup-area {
  margin-top: 10px;
}

.copy-btn {
  padding: 8px 14px;
  border-radius: 14px;
  border: none;
  cursor: pointer;

  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.copy-message {
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.copy-message.show {
  opacity: 1;
}

/* ---------------- FOOTER ---------------- */
.footer-links {
  font-size: 11px;
  opacity: 0.6;

  display: flex;
  gap: 6px;
}

.footer-link {
  text-decoration: none;
  color: inherit;
}

/* ---------------- UTILITY ---------------- */
.hidden {
  display: none !important;
}

.widget.font-default {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.widget.font-serif {
  font-family: Georgia, serif;
}

.widget.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sign-subtext {
  letter-spacing: 0.3px;
  font-size: 10px;
  opacity: 0.6;

  text-align: center;
  margin-top: 4px;
  margin-bottom: 10px;

  line-height: 1.4;
}

/* ---------------- ICON TABS (CUTE SEGMENTED CONTROL) ---------------- */

.icon-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;

  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);

  border-radius: 14px;
  width: fit-content;

  margin-bottom: 10px;
}

/* each tab */
.icon-tab {
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.3px;

  padding: 5px 10px;
  border-radius: 10px;

  cursor: pointer;
  user-select: none;

  color: rgba(0, 0, 0, 0.55);

  transition: all 0.2s ease;
}

/* hover state */
.icon-tab:hover {
  background: rgba(255, 255, 255, 0.5);
  color: rgba(0, 0, 0, 0.75);
}

/* ACTIVE TAB = main character energy */
.icon-tab.active {
  background: rgba(255, 255, 255, 0.85);
  color: rgba(0, 0, 0, 0.85);

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);

  transform: translateY(-1px);
}
