/* ========================================================
   Class 1 Sunshine Calendar - Pure CSS Stylesheet
   Big, Bold, Highly Attractive Font & Colorful Minimalist Theme
   Zero Inline Styles
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Quicksand:wght@500;600;700&display=swap');

:root {
  --font-display: 'Fredoka', cursive, system-ui, sans-serif;
  --font-body: 'Quicksand', system-ui, -apple-system, sans-serif;
  --color-sunshine: #f59e0b;
  --color-coral: #f43f5e;
  --color-sky: #0284c7;
  --color-meadow: #10b981;
  --color-purple: #8b5cf6;
  --color-pink: #ec4899;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  background-color: #fefce8;
  background-image: radial-gradient(#fde047 1.25px, transparent 1.25px);
  background-size: 26px 26px;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.top-header {
  background-color: #ffffff;
  border-bottom: 3.5px solid #fed7aa;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.header-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.35));
  animation: sun-pulse 3s ease-in-out infinite alternate;
}

@keyframes sun-pulse {
  0% { transform: rotate(-3deg) scale(1); }
  100% { transform: rotate(3deg) scale(1.08); }
}

.brand-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #7c2d12;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-shadow: 0 1px 1px rgba(254, 215, 170, 0.6);
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: #ea580c;
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.btn-today {
  background-color: #fef3c7;
  color: #92400e;
  border: 2px solid #fde68a;
  box-shadow: 0 3px 0 #fcd34d;
}
.btn-today:hover {
  background-color: #fde68a;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #fcd34d;
}
.btn-today:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #fcd34d;
}

.btn-primary {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 4px 0 #c2410c, 0 6px 12px rgba(234, 88, 12, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #9a3412, 0 8px 16px rgba(234, 88, 12, 0.3);
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #9a3412;
}

.btn-cancel {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.btn-cancel:hover {
  background-color: #e2e8f0;
}

.btn-icon {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s ease;
}
.btn-icon:hover {
  background-color: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.btn-delete:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Main Layout */
.main-wrapper {
  max-width: 1150px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px;
  flex: 1;
}

/* Category Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  margin-bottom: 22px;
}

.filter-chip {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 14px;
  border: 2px solid #fed7aa;
  background-color: #ffffff;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.08);
}

.filter-chip:hover {
  background-color: #fff7ed;
  border-color: #fb923c;
  transform: translateY(-1px);
}

.filter-chip.active {
  background-color: #ea580c;
  color: #ffffff;
  border-color: #c2410c;
  box-shadow: 0 4px 0 #9a3412;
}

/* 2-Column Responsive Workspace */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 960px) {
  .calendar-layout {
    grid-template-columns: 60% 40%;
  }
}

/* Calendar Card */
.calendar-card {
  background-color: #ffffff;
  border: 3px solid #fed7aa;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.calendar-top {
  background: linear-gradient(90deg, #f97316 0%, #ec4899 50%, #8b5cf6 100%);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.month-label {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.month-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.25);
  padding: 4px 8px;
  border-radius: 14px;
  backdrop-blur-sm: 4px;
}

.nav-arrow {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}
.nav-arrow:hover {
  background-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

/* Weekday Labels */
.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #fff7ed;
  border-bottom: 2px solid #fed7aa;
  text-align: center;
}

.weekday-col {
  padding: 12px 4px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.col-sun { color: #e11d48; }
.col-mon { color: #d97706; }
.col-tue { color: #ca8a04; }
.col-wed { color: #059669; }
.col-thu { color: #0284c7; }
.col-fri { color: #7c3aed; }
.col-sat { color: #db2777; }

/* Grid of Days */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 10px;
  background-color: #fffbf5;
}

.day-cell {
  background-color: #ffffff;
  border: 2px solid #fed7aa;
  border-radius: 16px;
  min-height: 94px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-cell:hover {
  border-color: #f97316;
  background-color: #fff7ed;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

.day-cell.other-month {
  opacity: 0.35;
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

.day-cell.today {
  border-color: #f59e0b;
  background-color: #fefce8;
  box-shadow: 0 0 0 2px #fde68a;
}

.day-cell.selected {
  border-color: #f43f5e;
  background-color: #fff1f2;
  box-shadow: 0 0 0 3px #fda4af, 0 4px 12px rgba(244, 63, 94, 0.25);
}

.day-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  transition: all 0.15s ease;
}

.day-cell.today .day-num {
  background-color: #f59e0b;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.day-cell.selected .day-num {
  background-color: #f43f5e;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.4);
}

.day-count-badge {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  background-color: #ffedd5;
  color: #c2410c;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid #fdba74;
}

.event-dots-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.dot-homework { background-color: #3b82f6; }
.dot-backpack { background-color: #f59e0b; }
.dot-star { background-color: #ec4899; }
.dot-activity { background-color: #8b5cf6; }
.dot-notice { background-color: #ef4444; }

/* Day Updates Column */
.updates-card {
  background-color: #ffffff;
  border: 3px solid #fed7aa;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.updates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 2.5px solid #fed7aa;
  margin-bottom: 20px;
}

.updates-date-sub {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ea580c;
}

.updates-date-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  text-align: center;
  padding: 42px 20px;
  background-color: #fffbeb;
  border: 2px dashed #fcd34d;
  border-radius: 18px;
}

.empty-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.empty-action {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #ea580c;
  background: #ffffff;
  border: 2px solid #fed7aa;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
  transition: all 0.15s ease;
}
.empty-action:hover {
  background-color: #ffedd5;
  border-color: #fb923c;
}

/* Category Update Cards */
.update-item {
  border-radius: 18px;
  padding: 18px;
  border-left-width: 6px;
  border-left-style: solid;
  border-top: 2px solid #e2e8f0;
  border-right: 2px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.update-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.update-item.card-homework {
  border-left-color: #3b82f6;
  border-color: #bfdbfe;
  background-color: #eff6ff;
}
.update-item.card-backpack {
  border-left-color: #f59e0b;
  border-color: #fde68a;
  background-color: #fffbeb;
}
.update-item.card-star {
  border-left-color: #ec4899;
  border-color: #fbcfe8;
  background-color: #fdf2f8;
}
.update-item.card-activity {
  border-left-color: #8b5cf6;
  border-color: #ddd6fe;
  background-color: #faf5ff;
}
.update-item.card-notice {
  border-left-color: #ef4444;
  border-color: #fecaca;
  background-color: #fef2f2;
}

.update-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.category-tag {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.update-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.3;
}

.update-details {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  line-height: 1.55;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background-color: #ffffff;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.3);
  border: 3px solid #fed7aa;
}

.modal-header {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.modal-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.03em;
}

.form-input, .form-select, .form-textarea {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 14px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  background-color: #f8fafc;
  color: #0f172a;
  transition: border-color 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #f97316;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.form-textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
