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


.builder-ui {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 10px;
}

.widget-header {
  font-size: 15px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
}

.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;
}


.btn {
  cursor: pointer;

  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;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 4px;

  transition: transform 0.2s ease;
}

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

.top-left-controls {
  position: relative;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;

  margin: 10px 0 6px;
}

.setup-area {
  margin-top: 10px;
  text-align: center;
}
.theme-toggle-btn {
  position: relative;
}

.theme-toggle-btn::before {
  content: "";

  width: 20px;
  height: 20px;

  border-radius: 50%;
  border: 2px solid white;

  background: var(--theme-color, #f4dfeb);

  display: block;
}

/* Theme options dropdown container */
.theme-options {
  position: absolute;
  top: 68px;
  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;
}

/* title inside popup */
.theme-options::before {
  content: "select theme";
  font-size: 11px;
  opacity: 0.6;
}

/* row of circles */
.theme-options .themes-row {
  display: flex;
  gap: 10px;
}

/* circles */
.theme-circle {
  width: 22px;
  height: 22px;

  border-radius: 50%;

  cursor: pointer;

  border: 2px solid rgba(0,0,0,0.08);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-circle:hover {
  transform: scale(1.25);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}
.theme-circle.pink {
  background-color: #f4dfeb;
}

.theme-circle.beige {
  background-color: #faebdd;
}

.theme-circle.blue {
  background-color: #ddebf1;
}

.theme-circle.green {
  background-color: #ddedea;
}
.theme-circle.black {
  background: #17171a;
}

.theme-circle.white {
  background: #f8f6f3;
  border: 1px solid rgba(0,0,0,0.08);
}
.theme-circle.active {
  border: 2px solid #333;
  transform: scale(1.15);
}

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

/* ================= GRID ================= */

.day-cell {
  height: 78px;
  border-radius: 10px;
  background: #f2f2f2;
  position: relative;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.day-label {
  position: absolute;
  top: 4px;
  font-size: 10px;
  color: #555;
}

.day-content {
  font-size: 12px;
}
.grid {
  display: grid;

  grid-template-columns: repeat(7, 1fr);

  gap: 10px;

  margin-bottom: 2px;
}

/* ================= MOOD MENU ================= */
.mood-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.98);

  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);

  padding: 10px;

  border-radius: 16px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;

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

  animation: pop 0.15s ease-out;
}

.mood-option {
  font-size: 9px;
  text-align: center;
  cursor: pointer;

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

  gap: 4px;

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

  transition: transform 0.15s ease, background 0.15s ease;
}

.mood-option:hover {
  transform: scale(1.08);
  background: rgba(0,0,0,0.04);
}
.copy-message {
  margin-top: 6px;
  font-size: 12px;
  color: #888;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.hidden {
  display: none !important;
}
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.widget {
  position: relative;

  overflow: hidden;

  width: 400px;

  margin: 0;
  padding: 14px;

  border-radius: 16px;

  box-sizing: border-box;

  isolation: isolate;

  display: flex;
  flex-direction: column;

  justify-content: flex-start;
  align-items: stretch;

  gap: 6px;
}

.reset-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 80%;
  max-width: 240px;

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

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

  box-shadow: 0 18px 50px rgba(0,0,0,0.18);

  text-align: center;

  z-index: 9999;
}

.day-label {
  position: absolute;
  top: 4px;
  font-size: 10px;
  color: #555;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.day-date {
  font-size: 9px;
  opacity: 0.6;
}

.log-popup {
  position: absolute;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  width: 260px;
  height: 220px;

  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);

  border-radius: 16px;

  padding: 10px;

  z-index: 999;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  box-sizing: border-box;
}

.widget-header-title {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;

  padding: 0;
  margin-bottom: 6px;

  color: inherit;
  opacity: 0.9;
}
.reset-popup p,
.log-popup h3 {
  margin: 0 0 8px 0;
  font-size: 12px;
  opacity: 0.8;
}

/* 🔥 TIGHT WIDGET FOOTER FIX */
#reset-button,
#view-log-btn {
  margin: 4px 0;
}

#log-entries {
  display: grid;

  grid-template-columns: repeat(18, 8px);

  justify-content: center;
  align-content: start;

  gap: 3px;

  padding: 8px;

  overflow-y: auto;

  max-height: 180px;

  flex: 1;
}

.year-cell {
  width: 7px;
  height: 7px;

  border-radius: 2px;

  background: #bde5d2;
}

.year-cell:hover {
  transform: scale(1.4);
}

.reset-popup,
.log-popup {
  max-height: 85%;
}
#close-log-btn {
  margin-top: 8px;
  position: relative;
  z-index: 999;
}

.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);

  text-align: center;

  color: #444;

  margin-bottom: 8px;
}

.footer-links {
  margin-top: 12px;

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

  gap: 8px;

  font-size: 11px;

  opacity: 0.65;
}

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

  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.divider {
  opacity: 0.4;
}

.font-option {
  font-size: 12px;
  padding: 6px 10px;

  border-radius: 10px;

  cursor: pointer;

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

  transition: all 0.2s ease;
}

.font-option:hover {
  transform: scale(1.05);
  background: rgba(255,255,255,0.9);
}
.font-option[data-font="default"] {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.font-option[data-font="serif"] {
  font-family: Georgia, serif;
}

.font-option[data-font="mono"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

button,
.copy-btn,
.reset-btn,
.view-log-btn,
#confirm-reset,
#cancel-reset,
#close-log-btn {
  appearance: none;
  -webkit-appearance: none;

  border: none;
  outline: none;

  font-family: inherit;
  text-transform: lowercase;

  background: rgba(255, 255, 255, 0.78);
  color: inherit;

  border-radius: 999px;
  padding: 7px 14px;

  font-size: 12px;
  font-weight: 500;

  cursor: pointer;

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

  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

button:hover,
.copy-btn:hover,
.reset-btn:hover,
.view-log-btn:hover,
#confirm-reset:hover,
#cancel-reset:hover,
#close-log-btn:hover {
  transform: translateY(-1px) scale(1.03);
  background: rgba(255, 255, 255, 0.95);
}

button:active,
.copy-btn:active,
.reset-btn:active,
.view-log-btn:active,
#confirm-reset:active,
#cancel-reset:active,
#close-log-btn:active {
  transform: scale(0.97);
}

#reset-button,
#view-log-btn {
  width: fit-content;
  align-self: center;
  margin: 3px 0;
}

.reset-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

#close-log-btn {
  align-self: center;
  margin-top: 8px;
}
.copy-btn {
  border-radius: 999px !important;

  padding: 10px 18px;

  width: auto;

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

.widget.black {
  background: #1b1b1f;
  color: #e7e1dc;
}

.widget.black .day-cell,
.widget.black .checkin-textarea,
.widget.black .weekly-grid,
.widget.black .calendar-day,
.widget.black .vision-cell {
  background: rgba(255,255,255,0.06);
  color: #e7e1dc;
}

.widget.black button,
.widget.black .reset-btn,
.widget.black .view-log-btn,
.widget.black .save-btn,
.widget.black .copy-btn {
  background: rgba(255,255,255,0.08) !important;
  color: #e7e1dc !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.widget.black .mood-menu,
.widget.black .reset-popup,
.widget.black .log-popup,
.widget.black .entries-popup {
  background: #242429;
  color: #e7e1dc;
}

.widget.black .day-label,
.widget.black .day-date,
.widget.black .widget-header-title,
.widget.black .checkin-prompt {
  color: rgba(231,225,220,0.72);
}

.widget.black .mood-option:hover,
.widget.black button:hover {
  background: rgba(255,255,255,0.11) !important;
}
