:root {
  --bg-color: #ffffff;
  --text-main: #0f172a;
  --text-sub: #475569;
  --border-color: #cbd5e1;
  --point-blue: #0ea5e9;
  --point-red: #ff3d3d;

  --window-width: 980px;
  --countdown-width: 300px;
  --timetable-width: 420px;
  --meal-width: 300px;
  
  --gap: 20px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  font-family: "Noto Sans KR", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow: hidden;
}

.desktop-window { transition: border-color 0.2s }
.desktop-window {
  position: fixed;
  background: #ffffff;
  border: 1px solid #aaaaaa00;
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.desktop-window:hover {
  border-color: #aaaaaa50;
} 

.countdown-window { top: 50px; left: 50px; width: var(--countdown-width); }
.timetable-window { top: 100px; right: 50px; width: var(--timetable-width); }
.meal-window { bottom: 50px; left: 50px; width: var(--meal-width); }

.window-titlebar { transition: background-color 0.2s; }
.window-titlebar {
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  cursor: grab;
}
.window-titlebar:hover {
  background-color: #eeeeee;
}

.window-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: bold;
}

.window-controls { margin-left: auto; }

.window-control-btn {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 0.75rem;
  padding: 4px 8px;
  cursor: pointer;
}

.window-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.clock-digital { font-size: 2rem; font-weight: bold; text-align: center; margin: 0; }
.info-text { font-size: 1.1rem; text-align: center; margin: 0; color: var(--text-sub); }
.timer-text { font-size: 1.5rem; font-weight: bold; text-align: center; margin: 0; color: var(--point-red); }
.meal-text { line-height: 1.6; white-space: pre-line; margin: 0; }

.timetable-container { width: 100%; overflow-x: auto; }
.timetable-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 0.9rem; }
.timetable-table th, .timetable-table td { border: 1px solid var(--border-color); padding: 6px; }
.timetable-table td { transition: background-color 0.2s; }
.timetable-table td:hover { background-color: #eeeeee; }
.timetable-table thead th { background: #f1f5f9; }

.is-today { background-color: #e0f2fe; }

.timetable-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 5px; }
.timetable-select { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border-color); }

@media (max-width: 900px) {
  body { overflow-y: auto; padding: 12px; }
  .desktop-window {
    position: static;
    width: 100% !important;
    margin-bottom: 15px;
  }
  .window-control-btn { display: none; }
}

.desktop-window.is-in-pip { position: static; width: 100%; border: none; box-shadow: none; height: 100%; display: flex; flex-direction: column; }
.desktop-window.is-in-pip .window-content { flex: 1; overflow: auto; }
.desktop-window.is-in-pip .window-titlebar { display: none; }
