* { box-sizing: border-box; font-family: Arial, sans-serif; }

body {
  margin: 0;
  background: #1e1e1e;
  color: white;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ---------------------- 타이머 + 음악 ---------------------- */
#timer-container {
  flex: 1;
  position: relative;
}

/* 타이머 중앙 고정 */
#timer-display {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#timer { font-size: 100px; }
#timer-controls {
  margin-top: 30px;
  display: flex;
  gap: 15px;
}
#timer-controls button {
  background: #2196f3;
  border: none;
  color: white;
  font-size: 16px;
  height: 45px;
  padding: 0 40px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#timer-controls button:hover { background: #1976d2; }

/* 영상 플레이어 왼쪽 고정 */
#musicPlayer {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  user-select: none; /* 텍스트 선택 방지 */
  cursor: grab;
}
#musicPlayer iframe, #musicPlayer audio {
  width: 400px;
  height: 220px;
  border-radius: 8px;
}

/* ---------------------- 카드 영역 ---------------------- */
#bottom {
  display: flex;
  height: 250px;
  gap: 12px;
  padding: 10px;
}
.card {
  flex: 1;
  background: #2c2c2c;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 18px;
  gap: 15px;
}
.card h3 { margin: 0 0 8px 0; text-align: center; }
.card input, .card button {
  width: 100%;
  height: 45px;
  font-size: 15px;
  border-radius: 8px;
  border: none;
  padding: 0 12px;
}
.time-input-group { width: 100%; display: flex; gap: 15px; }
.time-input-group input { flex: 1; min-width: 0; }

/* 시간 설정 버튼 */
#time-set button { background: #4caf50; color: white; }
#time-set button:hover { background: #45a049; }

/* 음악 버튼 */
#music-section button { background: #ff9800; color: white; }
#music-section button:hover { background: #fb8c00; }

/* 일정 추가 버튼 핑크색 */
#schedule button {
  background: #e91e63;
  color: white;
}
#schedule button:hover {
  background: #c2185b;
}

/* ---------------------- 반응형 ---------------------- */
@media screen and (max-width: 900px) {
  #bottom { flex-direction: column; height: auto; }
  .card { width: 100%; }
  #timer-controls button { padding: 0 25px; }
  #musicPlayer { position: static; transform: none; margin-bottom: 20px; }
  #timer-display { position: static; transform: none; margin-bottom: 20px; text-align: center; }
}

/* ---------------------- 일정 패널 ---------------------- */
#todo-panel {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 230px;
  background: rgba(255, 255, 255, 0.85);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  backdrop-filter: blur(5px);
  color: black;
}
#todo-panel h3 { margin-top: 0; font-size: 16px; font-weight: 700; }
.todo-item { display: flex; align-items: center; margin: 6px 0; gap: 8px; }
.todo-item label.checked { text-decoration: line-through; opacity: 0.6; }
.todo-delete {
  margin-left: auto;
  cursor: pointer;
  color: #c00;
  font-weight: 900;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
}

.work-mode #timer { color: #4caf50; }
.break-mode #timer { color: #ff9800; }

#timer-controls button.pomodoro-btn {
  background: #e53935;
}
#timer-controls button.pomodoro-btn:hover {
  background: #c62828;
}
