body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  user-select: none;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ===== Draggable Bottom Menu ===== */
/* ===== Draggable Bottom Menu (Glassmorphic) ===== */
#menu-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;

  /* 🔥 Glassmorphic background */
  background: rgba(255, 255, 255, 0.15);   /* semi-transparent */
  backdrop-filter: blur(10px);              /* blur the background behind */
  -webkit-backdrop-filter: blur(10px);      /* for Safari */
  border: 1px solid rgba(255,255,255,0.3); /* subtle frosted border */
  
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  cursor: grab;
  z-index: 1000;
}


/* Each row sizes to its own content */
.menu-row {
  display: inline-flex;               /* 🔥 key fix */
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.menu-row-top {
  margin-bottom: 4px;
}

/* ===== Menu Buttons ===== */
#menu-controls button {
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* ===== Button Colors ===== */
#saveBtn {
  background: linear-gradient(135deg, #4caf50, #43a047);
  color: white;
}

#importFileBtn {
  background: #ff9800;
  color: white;
}

#clearBtn {
  background: linear-gradient(135deg, #ef5350, #e53935);
  color: white;
}

#gymBtn { background:#e53935; color:white; }
#workBtn { background:#1e88e5; color:white; }
#musicBtn { background:#8e24aa; color:white; }
#codeBtn { background:#43a047; color:white; }
#playBtn { background:#fdd835; color:#000; }
#runBtn { background:#f4511e; color:white; }
#readBtn { background:#ffe571; color:#000; }

#menu-controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

#menu-controls button:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ===== Calendar ===== */
.calendar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.days-header {
  display: flex;
  flex-shrink: 0;
}

.day-header-top {
  flex: 1;
  text-align: center;
  background: #333;
  color: white;
  padding: 5px 0;
  font-weight: bold;
  border-right: 1px solid #333;
}

.day-header-top:last-child {
  border-right: none;
}

.calendar {
  display: flex;
  flex: 1;
  border: 2px solid #333;
  overflow: auto;
  background: #fff;
}

.time-column {
  width: 50px;
  border-right: 1px solid #333;
  background: #eee;
  text-align: right;
  padding-right: 5px;
  min-height: 100%;
}

.time-label {
  height: 60px;
  line-height: 60px;
  border-bottom: 1px solid #ccc;
  font-size: 12px;
}

.days {
  display: flex;
  flex: 1;
}

.day {
  flex: 1;
  border-right: 1px solid #333;
  position: relative;
  background: #fff;
  min-width: 150px;
  min-height: calc(60px * 17);
}

.day:last-child {
  border-right: none;
}

/* ===== Blocks ===== */
.block {
  position: absolute;
  left: 5px;
  right: 5px;
  border-radius: 4px;
  border: 1px solid #666;
  cursor: grab;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 5px;
  user-select: none;
}

.block.dragging {
  opacity: 0.7;
  cursor: grabbing;
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.block.selected {
  outline: 2px solid #ff9800;
}

.resize-handle {
  width: 10px;
  height: 100%;
  cursor: ns-resize;
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(0,0,0,0.2);
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.delete-btn {
  position: absolute;
  top: -5px;
  right: 5px;
  cursor: pointer;
  color: red;
  font-weight: bold;
  font-size: 16px;
}



  /* ===== Save Tooltip (Modal) ===== */
  .save-tooltip {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.96);
      background: linear-gradient(180deg, #1f1f1f, #151515);
      color: #fff;
      padding: 18px 20px;
      border-radius: 14px;
      box-shadow:
          0 20px 40px rgba(0,0,0,0.6),
          inset 0 1px 0 rgba(255,255,255,0.06);
      z-index: 10000;
      font-size: 14px;
      min-width: 280px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease, transform 0.18s ease;
  }

  /* visible state */
  .save-tooltip:not(.hidden) {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
      pointer-events: auto;
  }

  /* label */
  .save-tooltip label {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 13px;
      color: #bbb;
  }

  /* filename input */
  .save-tooltip input {
      background: #0f0f0f;
      border: 1px solid #2a2a2a;
      color: #fff;
      padding: 8px 10px;
      border-radius: 8px;
      font-size: 14px;
      outline: none;
      transition: border 0.15s ease, box-shadow 0.15s ease;
  }

  .save-tooltip input:focus {
      border-color: #0b1520;
      box-shadow: 0 0 0 2px rgba(77,163,255,0.25);
  }

  /* buttons container */
  .save-actions {
      margin-top: 14px;
      display: flex;
      gap: 10px;
      justify-content: flex-end;
  }

  /* base button style */
  .save-actions button {
      padding: 7px 14px;
      border-radius: 8px;
      border: none;
      font-size: 13px;
      cursor: pointer;
      transition:
          background 0.15s ease,
          transform 0.08s ease,
          box-shadow 0.08s ease;
  }

  /* Save button (primary) */
  #confirmSave {
      background: linear-gradient(180deg, #4da3ff, #1e78ff);
      color: #fff;
      box-shadow: 0 6px 14px rgba(30,120,255,0.35);
  }

  #confirmSave:hover {
      background: linear-gradient(180deg, #5db0ff, #2b84ff);
  }

  #confirmSave:active {
      transform: translateY(1px);
      box-shadow: 0 3px 8px rgba(30,120,255,0.4);
  }

  /* Cancel button (secondary) */
  #cancelSave {
      background: #2a2a2a;
      color: #ccc;
  }

  #cancelSave:hover {
      background: #333;
  }

  #cancelSave:active {
      transform: translateY(1px);
  }

  /* hidden helper */
  .hidden {
      display: none;
  }



  /* ===== Work Indicator Dot ===== */
.work-dot {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.4);
  cursor: pointer;
}

/* ===== Work Dropdown ===== */
.work-menu {
  position: fixed;
  background: #1c1c1c;
  border-radius: 8px;
  padding: 6px;
  display: none;
  z-index: 10000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.work-menu div {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 6px;
}

.work-menu div:hover {
  background: rgba(255,255,255,0.08);
}
