/* style.css */
body {
  font-family: "Malgun Gothic", "Nanum Gothic", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f4f8;
  color: #333;
}

header,
nav,
main,
aside,
section,
footer {
  border: 1px solid #cce0f0;
  border-radius: 12px;
  padding: 15px 20px;
  margin: 10px auto;
  max-width: 1200px;
  box-sizing: border-box;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

header {
  background: linear-gradient(135deg, #a8dadc, #457b9d);
  color: white;
  text-align: center;
  padding: 20px 0;
  margin-top: 0;
  border-radius: 0 0 12px 12px;
}
header h1 {
  font-size: 2.2em;
  margin: 0;
}

nav {
  background: #f1faee;
  border-color: #a8dadc;
  padding: 10px 20px;
}
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
}
nav a {
  text-decoration: none;
  color: #1d3557;
  font-size: 1.1em;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
}
nav a:hover {
  background-color: #457b9d;
  color: white;
}

.main-layout {
  display: flex;
  gap: 15px;
  padding: 15px;
  background-color: #ffffff;
  min-height: 500px;
  align-items: flex-start;
}

aside {
  flex: 1;
  background: #e0f7fa;
  border-color: #b2ebf2;
  padding: 20px;
  text-align: left;
}
aside h2 {
  border-bottom: 2px solid #00bcd4;
  padding-bottom: 5px;
  margin-top: 0;
  color: #00796b;
}

section {
  flex: 2;
  background: #ffffff;
  border-color: #e0e0e0;
  padding: 20px;
  text-align: left;
}
section h2 {
  color: #1d3557;
  border-left: 5px solid #457b9d;
  padding-left: 10px;
  margin-top: 0;
}
section p,
section ol li {
  font-size: 1em;
  line-height: 1.8;
}
section ol {
  padding-left: 25px;
}

footer {
  background: #457b9d;
  color: white;
  border-color: #1d3557;
  text-align: center;
  padding: 15px 0;
  margin-bottom: 0;
  border-radius: 12px 12px 0 0;
}
footer p {
  margin: 0;
  font-size: 0.85em;
}

.diary-form label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: bold;
  color: #1d3557;
}
.diary-form input[type="date"],
.diary-form input[type="text"],
.diary-form textarea {
  width: 98%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 1em;
}
.diary-form textarea {
  resize: vertical;
  min-height: 300px;
}
.diary-form button {
  background-color: #457b9d;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  margin-top: 20px;
  transition: background-color 0.3s;
}
.diary-form button:hover {
  background-color: #1d3557;
}

.calendar-container {
  text-align: center;
}
.calendar-container table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  table-layout: fixed;
}
.calendar-container th,
.calendar-container td {
  border: 1px solid #ddd;
  padding: 10px 5px;
  height: 80px;
  vertical-align: top;
  font-size: 0.9em;
}
.calendar-container th {
  background-color: #a8dadc;
  color: #1d3557;
}
.calendar-container td.today {
  background-color: #f1faee;
  border: 2px solid #457b9d;
}
.calendar-container td:nth-child(1) {
  color: red;
}
.calendar-container td:nth-child(7) {
  color: blue;
}
.event {
  display: block;
  background-color: #e63946;
  color: white;
  border-radius: 4px;
  padding: 2px;
  margin-top: 3px;
  font-size: 0.75em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px dashed #ccc;
}
.todo-item:last-child {
  border-bottom: none;
}
.todo-item input[type="checkbox"] {
  margin-right: 15px;
  width: 20px;
  height: 20px;
  cursor: default;
}
.todo-item.completed {
  text-decoration: line-through;
  color: #777;
  background-color: #f9f9f9;
}
.todo-item label {
  flex-grow: 1;
  font-size: 1.05em;
  display: flex;
  align-items: center;
}
.todo-priority {
  font-weight: bold;
  color: #e63946;
  margin-right: 10px;
}
.add-todo-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #a8dadc;
}
.add-todo-form input[type="text"] {
  flex-grow: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.add-todo-form button {
  background-color: #457b9d;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: default;
}

@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }
  nav ul {
    flex-direction: column;
    gap: 10px;
  }
  nav a {
    display: block;
  }
}
