:root {
  --bg-start: #09111d;
  --bg-end: #1d2d44;
  --panel-bg: rgba(10, 15, 25, 0.42);
  --panel-border: rgba(154, 181, 255, 0.35);
  --text-main: #eef5ff;
  --text-subtle: rgba(238, 245, 255, 0.8);
  --accent: #8fd3ff;
  --shadow: rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--text-main);
}

body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-button {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 15, 25, 0.4);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.settings-panel {
  position: fixed;
  top: 72px;
  right: 22px;
  z-index: 4;
  width: min(290px, calc(100vw - 32px));
  background: rgba(9, 17, 29, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  padding: 18px 18px 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.settings-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.settings-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.settings-close {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.settings-group {
  margin-bottom: 18px;
}

.settings-group label,
.settings-group legend {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--text-subtle);
}

.settings-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 0.96rem;
}

.order-group {
  border: none;
  padding: 0;
  margin: 0;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: var(--text-main);
}

.radio-option input {
  accent-color: #8fd3ff;
}

.google-group {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
}

.google-login-button {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(143, 211, 255, 0.55);
  border-radius: 10px;
  background: rgba(143, 211, 255, 0.12);
  color: var(--text-main);
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
}

.google-login-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.google-status {
  margin: 10px 0 0;
  color: var(--text-subtle);
  font-size: 0.8rem;
  text-align: center;
}

.slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #09111d;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  filter: brightness(0.6) saturate(0.8);
  transform: scale(1.03);
}

.slide-image.is-visible {
  opacity: 1;
}

.screen {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 56px);
}

.time-panel {
  width: min(100%, 820px);
  padding: clamp(28px, 5vw, 72px) clamp(24px, 4vw, 56px);
  border-radius: 28px;
  text-align: center;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 18px 65px var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.label {
  margin: 0 0 20px;
  color: var(--text-subtle);
  font-size: clamp(1rem, 2vw, 1.6rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.time {
  margin: 0;
  font-size: clamp(4rem, 10vw, 12rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--text-main);
  text-shadow: 0 0 24px rgba(143, 211, 255, 0.35);
}

.date {
  margin-top: 20px;
  font-size: clamp(1.2rem, 2.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}

.calendar {
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
}

.month-label {
  margin-bottom: 18px;
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday-row {
  margin-bottom: 10px;
}

.weekday {
  font-size: clamp(0.8rem, 1.4vw, 1.1rem);
  font-weight: 600;
  color: var(--text-subtle);
  padding: 8px 0;
}

.weekday.sunday,
.day-cell.is-sunday {
  color: #ff6b6b;
}

.weekday.saturday,
.day-cell.is-saturday {
  color: #5aa9ff;
}

.day-cell {
  position: relative;
  min-height: clamp(42px, 6vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border-radius: 12px;
  font-size: clamp(0.95rem, 1.8vw, 1.4rem);
  font-weight: 500;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.day-number {
  line-height: 1;
}

.day-cell.is-empty {
  background: transparent;
  border-color: transparent;
}

.day-cell.is-today {
  background: rgba(143, 211, 255, 0.22);
  border-color: rgba(143, 211, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(143, 211, 255, 0.6);
  font-weight: 700;
}

.calendar-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8fd3ff;
  box-shadow: 0 0 0 2px rgba(143, 211, 255, 0.18);
}

.event-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 17, 29, 0.38);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.event-detail-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.event-detail-panel {
  width: min(420px, calc(100vw - 32px));
  max-height: min(68vh, 520px);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(9, 17, 29, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.event-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.event-detail-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-main);
}

.event-detail-close {
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.event-detail-date {
  padding: 14px 18px 0;
  font-size: 0.95rem;
  color: var(--text-subtle);
}

.event-detail-list {
  list-style: none;
  margin: 0;
  padding: 12px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-detail-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(143, 211, 255, 0.08);
  border: 1px solid rgba(143, 211, 255, 0.16);
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}

@media (orientation: portrait) {
  .time-panel {
    width: min(92vw, 760px);
  }
}

@media (max-width: 480px) {
  .time {
    letter-spacing: 0.04em;
  }

  .date {
    letter-spacing: 0.03em;
  }

  .calendar {
    margin-top: 22px;
  }
}

@media (max-width: 480px) {
  .time {
    letter-spacing: 0.04em;
  }

  .date {
    letter-spacing: 0.03em;
  }
}
