:root {
  --color-primary: #1f4c77;
  --color-primary-soft: #285c8d;
  --color-primary-light: #3b6ea3;
  --color-accent: #f6c453;
  --color-bg: #f4f5fb;
  --color-surface: #ffffff;
  --color-text: #13233a;
  --color-muted: #6b7a92;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 22px 55px rgba(10, 35, 70, 0.18);
  --shadow-subtle: 0 10px 28px rgba(10, 35, 70, 0.12);
  --transition-fast: 0.24s ease;
  --transition-med: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #edf3ff 0, #f4f5fb 40%, #f7f7ff 80%);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 17px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(7, 26, 54, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(0);
  transition: background var(--transition-med), box-shadow var(--transition-med), transform var(--transition-med);
}

.site-header.header-scrolled {
  background: rgba(7, 26, 54, 0.98);
  box-shadow: 0 10px 35px rgba(4, 18, 40, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.18em;
  color: #ffffff;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
}

.nav a {
  padding: 6px 4px;
  position: relative;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 999px;
  transition: width var(--transition-med);
}

.nav a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav a:hover::after {
  width: 18px;
}

.nav-cta {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
}

.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 96px;
  padding-bottom: 120px;
  background: radial-gradient(circle at top, #315f90 0, #1f4c77 40%, #163656 80%);
  color: #ffffff;
  overflow: hidden;
}

.hero-bg-orbits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
}

.orbit-1 {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -40px;
  opacity: 0.7;
  animation: floatOrbit 18s linear infinite;
}

.orbit-2 {
  width: 260px;
  height: 260px;
  bottom: 40px;
  left: -60px;
  opacity: 0.4;
  animation: floatOrbit 20s linear infinite reverse;
}

.orbit-3 {
  width: 160px;
  height: 160px;
  top: 120px;
  left: 40%;
  opacity: 0.3;
  animation: floatOrbit 22s linear infinite;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 50px;
  align-items: center;
  z-index: 1;
}

.hero-content {
  max-width: 560px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: rgba(6, 20, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--color-accent) 0, #ffedc0 80%);
  box-shadow: 0 0 12px rgba(246, 196, 83, 0.8);
}

.hero h1 {
  margin: 18px 0 10px;
  font-size: 44px;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.hero-subtitle {
  margin: 0 0 26px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #ffe09a);
  color: #1a2638;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(6, 21, 42, 0.6);
  color: #ffffff;
}

.btn-outline:hover {
  background: rgba(6, 21, 42, 0.9);
  transform: translateY(-2px);
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  font-size: 12px;
}

.highlight-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(6, 22, 50, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.highlight-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.highlight-text {
  color: rgba(255, 255, 255, 0.78);
}

.hero-visual {
  max-width: 440px;
  justify-self: end;
}

.hero-logo-card {
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.16) 0, rgba(11, 40, 77, 0.94) 55%, rgba(5, 17, 37, 0.98) 100%);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-logo-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.hero-logo-main {
  font-size: 28px;
  letter-spacing: 0.24em;
}

.hero-logo-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-logo {
  width: 200px;
  margin: 0 auto 18px;
}

.hero-logo-caption {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(5, 18, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-number {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.metric-label {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
}

.section {
  padding: 96px 0;
  background: transparent;
}

.section-alt {
  background: linear-gradient(180deg, #f4f6fb 0, #eef3ff 60%, #f4f6fb 100%);
}

.section-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.section-header p {
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: flex-start;
}

.section-text h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
}

.section-text p {
  margin: 0 0 14px;
  color: var(--color-muted);
  font-size: 16px;
}

.section-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--color-text);
  font-size: 15px;
}

.section-list li + li {
  margin-top: 6px;
}

.section-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-card {
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
}

.aside-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.aside-card p {
  margin: 0;
  font-size: 14px;
  color: var(--color-muted);
}

.aside-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.aside-pill {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(31, 76, 119, 0.2);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  color: var(--color-primary-soft);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.course-card {
  padding: 22px 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
  border-top: 3px solid rgba(31, 76, 119, 0.7);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.course-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.course-card p {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--color-muted);
}

.course-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--color-text);
}

.course-card li + li {
  margin-top: 4px;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: var(--color-accent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(31, 76, 119, 0.12);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  font-size: 15px;
  color: var(--color-muted);
}

.teacher-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 18px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
}

.teacher-initial {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: radial-gradient(circle at top, #ffffff 0, #f8f4e5 40%, #f0d48a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #4a3210;
}

.teacher-info h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.teacher-info p {
  margin: 0;
  font-size: 14px;
  color: var(--color-muted);
}

.teacher-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--color-muted);
}

.map-card {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.map-placeholder {
  height: 200px;
  background: radial-gradient(circle at top, #2f5c8c 0, #1f4c77 40%, #132f4c 100%);
  position: relative;
  overflow: hidden;
}

.map-frame {
  border: 0;
  width: 100%;
  height: 100%;
}

.map-pin {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f95b5b;
  top: 45%;
  left: 52%;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.7);
  animation: pulse 1.8s infinite;
}

.map-info {
  padding: 16px 18px 18px;
}

.map-address {
  margin: 0 0 6px;
  font-weight: 500;
}

.map-info p {
  margin: 0;
  font-size: 15px;
  color: var(--color-muted);
}

.contact-form {
  padding: 22px 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.form-row input,
.form-row select,
.form-row textarea {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 30, 56, 0.18);
  font: inherit;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 1px rgba(31, 76, 119, 0.1);
  background: #fbfcff;
}

.form-submit {
  width: 100%;
  margin-top: 4px;
}

.form-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--color-muted);
}

.form-note[data-status="loading"] {
  color: var(--color-primary-soft);
}

.form-note[data-status="success"] {
  color: #1a7f3c;
}

.form-note[data-status="error"] {
  color: #b3261e;
}

.visual-admin-mode .site-header {
  box-shadow: 0 14px 40px rgba(4, 18, 40, 0.85);
}

.editable-text {
  transition: box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.visual-admin-mode .editable-text {
  cursor: text;
  border-radius: 6px;
}

.visual-admin-mode .editable-text:hover {
  background: rgba(255, 255, 255, 0.06);
}

.visual-admin-mode .editable-text:focus {
  outline: 1px solid rgba(246, 196, 83, 0.9);
  box-shadow: 0 0 0 2px rgba(246, 196, 83, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.visual-editor-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 60;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(7, 26, 54, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 13px;
}

.visual-editor-title {
  font-weight: 600;
}

.visual-editor-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visual-editor-button {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-accent), #ffe09a);
  color: #1a2638;
}

.visual-editor-button-secondary {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.visual-editor-message {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.8);
}

.visual-editor-message-loading {
  color: #ffe09a;
}

.visual-editor-message-success {
  color: #a4ffb3;
}

.visual-editor-message-error {
  color: #ffb3b3;
}

.admin-body {
  background: #f2f4fb;
}

.admin-main {
  padding: 88px 0;
}

.admin-inner {
  max-width: 960px;
}

.admin-header h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.admin-header p {
  margin: 0;
  font-size: 15px;
  color: var(--color-muted);
}

.admin-section {
  margin-top: 28px;
}

.admin-form {
  padding: 22px 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.admin-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.admin-field input,
.admin-field textarea {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 30, 56, 0.18);
  font: inherit;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.admin-status {
  font-size: 13px;
}

.admin-status-info {
  color: var(--color-muted);
}

.admin-status-loading {
  color: var(--color-primary-soft);
}

.admin-status-success {
  color: #1a7f3c;
}

.admin-status-error {
  color: #b3261e;
}

.admin-divider {
  margin: 18px 0;
  border: none;
  border-top: 1px solid rgba(15, 30, 56, 0.08);
}

.admin-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-muted);
}

.site-footer {
  padding: 20px 0 26px;
  background: #07142a;
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.footer-brand {
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s cubic-bezier(0.19, 1, 0.22, 1), transform 0.75s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: none;
}

@keyframes floatOrbit {
  0% {
    transform: rotate(0deg) translateY(0);
  }
  50% {
    transform: rotate(180deg) translateY(-14px);
  }
  100% {
    transform: rotate(360deg) translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
}

@media (max-width: 960px) {
  .header-inner {
    height: 64px;
  }

  .nav {
    gap: 12px;
    font-size: 13px;
  }

  .nav a:nth-child(2),
  .nav a:nth-child(3),
  .nav a:nth-child(4),
  .nav a:nth-child(5) {
    display: none;
  }

  .hero {
    padding-top: 88px;
    padding-bottom: 80px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-content {
    max-width: none;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-visual {
    max-width: none;
    justify-self: stretch;
  }

  .hero-highlights {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 72px 0;
  }

  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-grid,
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-placeholder {
    height: 180px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .section-header h2 {
    font-size: 24px;
  }
}
