:root {
  --bg-color: #000000;
  --card-bg: #1c1c1e;
  --text-primary: #ffffff;
  --text-secondary: #8e8e93;
  --accent: #0a84ff;
  --accent-hover: #0070e0;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  overflow: hidden; 
  user-select: none;
}

.container {
  padding: 16px 12px;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.person-header { text-align: center; margin-bottom: 12px; cursor: pointer; }
.person-header h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }

.swipe-dots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background-color: #3a3a3c; transition: background-color 0.3s; }
.dot.active { background-color: var(--text-primary); }

.time-nav {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card-bg); border-radius: 10px; padding: 8px 16px; margin-bottom: 16px;
}
.time-nav h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--accent); }
.icon-btn { background: transparent; border: none; color: var(--text-primary); font-size: 20px; padding: 0 10px; cursor: pointer; }
.icon-btn.hidden { visibility: hidden; }

.list-container { flex: 1; overflow-y: auto; padding-bottom: 80px; }
.task-list { list-style: none; padding: 0; margin: 0; background: var(--card-bg); border-radius: 12px; overflow: hidden; }
.task-item { padding: 14px 16px; border-bottom: 1px solid #3a3a3c; display: flex; align-items: center; justify-content: space-between; font-size: 15px; cursor: pointer; }
.task-item:last-child { border-bottom: none; }

.group-container { margin-bottom: 20px; }
.group-title { font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; margin: 0 0 8px 8px; }

.task-content {
  display: flex;
  align-items: center;
  flex: 1;
  overflow: hidden; 
}
.task-content span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkbox { width: 20px; height: 20px; border: 2px solid var(--text-secondary); border-radius: 50%; margin-right: 12px; flex-shrink: 0; transition: all 0.2s ease; }
.task-item.completed .task-content { color: var(--text-secondary); text-decoration: line-through; opacity: 0.6; }
.task-item.completed .checkbox { background-color: var(--accent); border-color: var(--accent); }

.task-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: bold;
  padding: 0 10px;
  cursor: pointer;
  margin-left: 10px;
}

.fab {
  position: fixed; bottom: 20px; right: 20px; width: 56px; height: 56px; border-radius: 50%;
  background-color: var(--accent); color: white; font-size: 28px; border: none;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.4); display: flex; align-items: center; justify-content: center; z-index: 10; cursor: pointer;
}

.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 100; transition: opacity 0.2s;
}
.modal-overlay.hidden { opacity: 0; pointer-events: none; }

.modal-content { 
  background: var(--card-bg); 
  width: 85%; 
  max-width: 400px; 
  border-radius: 14px; 
  padding: 20px; 
  box-sizing: border-box; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}
.modal-content h3 { margin: 0 0 16px 0; font-size: 18px; }

input[type="text"], select {
  width: 100%; 
  box-sizing: border-box; 
  padding: 12px; 
  border-radius: 8px;
  border: 1px solid #3a3a3c; 
  background: var(--bg-color); 
  color: white; 
  font-size: 16px; 
  margin-bottom: 12px;
  display: block;
}

.calendar-input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 10px !important;
  border-radius: 8px;
  border: 1px solid #3a3a3c;
  background: var(--bg-color);
  color: white;
  font-size: 14px !important;
  margin-bottom: 12px;
  display: block;
}

#date-input-container, #week-input-container, #repeat-until-container {
  width: 100%;
  box-sizing: border-box;
}

::-webkit-calendar-picker-indicator { filter: invert(1); }

.modal-options { display: flex; gap: 10px; margin-bottom: 12px; width: 100%; box-sizing: border-box; }
.modal-options select { flex: 1; min-width: 0; margin-bottom: 0; }
.hidden { display: none !important; }

.custom-days-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--bg-color);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #3a3a3c;
  margin-bottom: 12px;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
}
.custom-days-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; width: 100%; box-sizing: border-box; }
.right-actions { display: flex; gap: 16px; }

.text-btn, .primary-btn, .danger-btn { border: none; font-size: 16px; font-weight: 600; border-radius: 6px; padding: 8px 16px; cursor: pointer; }
.text-btn { background: transparent; color: var(--text-secondary); }
.primary-btn { background: var(--accent); color: white; }
.danger-btn { background: #ff453a; color: white; }