:root {
  --primary: #28e2e2;
  --primary-deep: #1dbdbd;
  --primary-soft: #ecffff;
  --bg: #f4f8fb;
  --card: #ffffff;
  --text: #15222f;
  --muted: #5e6a76;
  --border: #d7e4ee;
  --shadow: 0 12px 32px rgba(16, 32, 56, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --cookie-banner-desktop-height: 126px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(40, 226, 226, 0.18), transparent 34%),
    linear-gradient(180deg, #f8fcff 0%, var(--bg) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(26, 49, 77, 0.08);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.brand-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #dcf8f8;
  border: 1px solid #b9eeee;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-logo-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b4d4d;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 16px;
}

.brand-text span {
  font-size: 12px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  font-size: 12px;
  color: #125757;
  border: 1px solid #a6ebeb;
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 6px 10px;
}

.page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  flex: 1;
}

.with-login-extras .page {
  padding-bottom: 40px;
}

.hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero h1 {
  margin: 0;
  font-size: 30px;
}

.hero p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

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

.feature-card,
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.feature-card h2 {
  margin: 0;
  font-size: 20px;
}

.feature-subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #168f8f;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feature-card p {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.7;
  min-height: 82px;
}

.project-wrap {
  padding-top: 8px;
}

.project-card h1 {
  margin: 0;
  font-size: 32px;
}

.project-card p {
  margin: 12px 0 20px;
  color: var(--muted);
  line-height: 1.75;
}

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

.btn {
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.04s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #073838;
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-deep);
}

.btn-ghost {
  color: #0e5f5f;
  background: #e6fbfb;
  border: 1px solid #bceeed;
}

.btn-ghost:hover {
  background: #d4f7f7;
}

.btn-outline {
  color: #0e5f5f;
  background: transparent;
  border: 1px solid #97dcdc;
}

.btn-outline:hover {
  background: #f0fdfd;
}

.full-width {
  width: 100%;
}

.login-layout {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
  padding-top: 16px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-logo-wrap {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  margin-bottom: 18px;
  border: 1px solid #b9eeee;
  background: #dcf8f8;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.login-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-logo-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0b4d4d;
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
}

.login-subtitle {
  margin: 10px 0 20px;
  color: var(--muted);
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  font-size: 14px;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid #c9dae7;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(40, 226, 226, 0.18);
}

.notice-error {
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid #f5c9cf;
  background: #fff3f5;
  color: #a23345;
  font-size: 13px;
  padding: 10px 12px;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: rgba(15, 35, 50, 0.94);
  color: #eef7ff;
  border-radius: 0;
  padding: 24px 20px;
  min-height: var(--cookie-banner-desktop-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 30;
  box-shadow: 0 14px 30px rgba(7, 20, 34, 0.35);
}

.cookie-text {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-banner .btn-primary {
  min-width: 90px;
}

.cookie-banner .btn-ghost {
  min-width: 90px;
  color: #d7fcfc;
  border-color: rgba(131, 235, 235, 0.5);
  background: rgba(67, 158, 158, 0.28);
}

.cookie-banner.is-hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 12, 20, 0.55);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal[hidden] {
  display: none !important;
}

.modal-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
}

.modal-card h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.site-footer {
  width: 100%;
  text-align: center;
  padding: 10px 16px 16px;
}

.with-login-extras .site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 10;
  padding: 0 16px;
  pointer-events: none;
}

.with-login-extras .site-footer a {
  pointer-events: auto;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  color: #5e6a76;
  line-height: 1.8;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-separator {
  margin: 0 8px;
}

@media (max-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .page {
    padding: 20px 14px 36px;
  }

  .with-login-extras .page {
    padding-bottom: 36px;
  }

  .hero h1,
  .project-card h1,
  .login-card h1 {
    font-size: 24px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card p {
    min-height: 0;
  }

  .login-card {
    padding: 22px;
  }

  .cookie-banner {
    padding: 10px 14px;
    min-height: 0;
    flex-wrap: wrap;
  }

  .cookie-actions {
    margin-left: auto;
    width: auto;
  }

  .cookie-actions .btn {
    flex: 0 0 auto;
  }

  .footer-separator {
    display: none;
  }

  .site-footer p {
    display: grid;
    gap: 2px;
  }

  .with-login-extras .site-footer {
    bottom: 10px;
    padding: 0 12px;
  }
}
