:root {
  --bg-start: #ffffff;
  --bg-end: #ffffff;
  --card-bg: rgba(249, 250, 251, 0.9);
  --text: #374151;
  --muted: #6b7280;
  --heading: #1f2937;
  --link: #006EFF;
  --divider: rgba(209, 213, 219, 0.3);
  --btn: #002F87;
  --btn-hover: #001C52;
  --btn-text: #ffffff;
  --input-bg: rgba(255, 255, 255, 0.06);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --focus: #006EFF;
  --city-navy: #002F87;
  --city-green: #8AC903;
  --highlight-blue: #006EFF;
  --deep-navy: #001C52;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 8vh, 4rem) 1.25rem;
  position: relative;
}

.stack {
  width: min(720px, 100%);
  text-align: center;
}

.brand {
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--city-navy);
  letter-spacing: -0.01em;
  margin: 0 0 1.75rem;
  line-height: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.brand-logo {
  height: clamp(2.4rem, 6.5vw, 3.3rem);
  width: auto;
  flex-shrink: 0;
}

/* Notice block */
.notice {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 1.5rem;
  line-height: 1.6;
  font-size: 0.95rem;
  text-align: left;
  margin: 0 auto 2rem;
  box-shadow: var(--shadow);
  border: 1px solid #e5e7eb;
}

.notice p {
  margin: 0 0 1rem;
  color: var(--text);
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice b {
  color: var(--city-navy);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

/* Language Switch Styling */
.language-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--divider);
}

.lang-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.switch-container {
  position: relative;
  display: inline-block;
}

.switch-input {
  display: none;
}

.switch-label {
  display: flex;
  position: relative;
  width: 80px;
  height: 32px;
  background: #f1f5f9;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.switch-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  z-index: 2;
  transition: color 0.3s ease;
}

.switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 36px;
  height: 28px;
  background: var(--city-navy);
  border-radius: 14px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 47, 135, 0.3);
}

.switch-input:checked + .switch-label .switch-slider {
  transform: translateX(40px);
}

.switch-input:checked + .switch-label .switch-text:first-child {
  color: var(--muted);
}

.switch-input:checked + .switch-label .switch-text:last-child {
  color: white;
}

.switch-input:not(:checked) + .switch-label .switch-text:first-child {
  color: white;
}

.content-en, .content-zh {
  transition: opacity 0.3s ease;
}

.notice a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.notice a:hover,
.notice a:focus {
  text-decoration: underline;
  color: var(--highlight-blue);
}

/* Alert box styling */
.alert-box {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  color: #059669;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.alert-box:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
}

.alert-box.collapsed {
  max-height: 3rem;
}

.alert-box.expanded {
  max-height: 10rem;
}

.alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.alert-content {
  flex: 1;
  min-width: 0;
}

.alert-content-en, .alert-content-zh {
  flex: 1;
  min-width: 0;
}

.alert-summary {
  margin: 0;
  color: #059669;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 600;
}

.alert-details {
  margin: 0.5rem 0 0 0;
  color: #059669;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.alert-box.expanded .alert-details {
  opacity: 1;
  max-height: 5rem;
}

.time-zones {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.time-zone {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.8rem;
}

.time-zone small {
  font-weight: 500;
  opacity: 0.8;
  font-size: 0.7rem;
}

.expand-indicator {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

.alert-box.expanded .expand-indicator {
  transform: rotate(180deg);
}

/* Modern button styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  color: var(--btn-text);
  background: var(--city-navy);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 47, 135, 0.2);
  text-decoration: none;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.btn:hover {
  background: var(--deep-navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 47, 135, 0.3);
}

.btn:active {
  transform: translateY(0);
  transition: transform 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Responsive spacing */
@media (max-width: 768px) {
  .notice {
    padding: 1.25rem;
    font-size: 0.95rem;
  }
  
  .notice p {
    margin-bottom: 0.85rem;
  }

  .brand {
    margin-bottom: 1.5rem;
    gap: 0.75rem;
  }

  .brand-logo {
    height: clamp(2.2rem, 6vw, 3rem);
  }

  .alert-box.expanded {
    max-height: 12rem;
    overflow-y: auto;
  }

  .alert-box.expanded .alert-details {
    max-height: none;
    overflow: visible;
  }

  .time-zones {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .time-zone {
    align-self: flex-start;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  .time-zone small {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .btn {
    min-height: 50px;
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}