* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Apple SD Gothic Neo', sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* 로그인 화면 */
#login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-box {
  background: white;
  padding: 48px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-box h1 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #e31e24;
}

.login-box p {
  color: #666;
  margin-bottom: 24px;
}

#login-btn {
  background: #4285f4;
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

/* 헤더 */
header {
  background: #e31e24;
  color: white;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header button {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}

/* 탭 */
nav {
  display: flex;
  background: white;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 15px;
  cursor: pointer;
  color: #666;
}

.tab-btn.active {
  color: #e31e24;
  border-bottom: 2px solid #e31e24;
  font-weight: bold;
}

/* 캘린더 헤더 */
#calendar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: white;
}

#calendar-header h2 {
  flex: 1;
  text-align: center;
  font-size: 18px;
}

#calendar-header button {
  background: none;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

#add-event-btn {
  background: #e31e24 !important;
  color: white !important;
  border: none !important;
}

/* 캘린더 그리드 */
#calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #eee;
  margin: 0 12px 12px;
  border-radius: 8px;
  overflow: hidden;
}

.day-header {
  background: #f9f9f9;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  color: #666;
  font-weight: bold;
}

.day-cell {
  background: white;
  min-height: 80px;
  padding: 6px;
  cursor: pointer;
}

.day-cell:hover {
  background: #fff8f8;
}

.day-num {
  font-size: 13px;
  color: #333;
}

.event-dot {
  background: #e31e24;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 모달 */
#event-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-box {
  background: white;
  padding: 24px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-box h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.modal-box label {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.modal-box input,
.modal-box select,
.modal-box textarea {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  font-size: 15px;
  width: 100%;
}

.modal-box textarea {
  height: 80px;
  resize: none;
}

.modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.modal-buttons button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.modal-buttons button:first-child {
  background: #e31e24;
  color: white;
}

.modal-buttons button:nth-child(2) {
  background: #f5f5f5;
  color: #333;
}

#delete-btn {
  background: #ff6b6b !important;
  color: white !important;
}