
:root {
  --bg-page: #040609;
  --bg-surface: rgba(11, 16, 25, 0.90);
  --bg-surface-solid: #0c111b;
  --bg-surface-alt: rgba(17, 24, 37, 0.85);
  --bg-hover: rgba(30, 44, 66, 0.95);
  --text-main: #ffffff;
  --text-muted: #f1f5f9;
  --text-faint: #cbd5e1;
  --border-main: rgba(123, 175, 212, 0.25);
  --border-light: rgba(123, 175, 212, 0.15);
  --accent-carolina: #7bafd4;
  --accent-gold: #f6ad55;
  --accent-emerald: #48bb78;
  --accent-coral: #fc8181;
  --font-serif: "Charter", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: #040609;
  background-image: radial-gradient(ellipse 90% 55% at 50% -5%, rgba(123, 175, 212, 0.22) 0%, transparent 65%),
                    linear-gradient(165deg, #040609 0%, #070a10 25%, #0a1019 55%, #0e1522 80%, #121a2a 100%);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: #ffffff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  padding: 8px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.25s ease;
}
.brand-header-img {
  height: 44px;
  width: auto;
  max-width: 290px;
  object-fit: contain;
  display: block;
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.brand-group:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}
.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-sub {
  font-size: 11px;
  font-family: 'Cinzel', var(--font-serif);
  color: #991b1b;
  background: #fef2f2;
  border: 1.5px solid #f87171;
  padding: 2.5px 9px;
  border-radius: 9999px;
  font-weight: 800;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(153, 27, 27, 0.06);
}

/* Modern Professional Top Navigation System */
.header-nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 1;
}

.workspace-segmented {
  display: inline-flex;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.ws-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.ws-tab-btn svg {
  color: #475569;
  transition: color 0.18s ease;
}
.ws-tab-btn:hover {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.ws-tab-btn:hover svg {
  color: #0284c7;
}
.ws-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.38);
}
.ws-tab-btn.active svg {
  color: #ffffff;
}
.ws-tab-btn.active .nav-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
.nav-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #334155;
  line-height: 1.3;
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: #cbd5e1;
  flex-shrink: 0;
  margin: 0 4px;
}

.header-hyperlinks {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.nav-hyperlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}
.nav-hyperlink svg {
  color: #0284c7;
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.18s ease;
}
.nav-hyperlink:hover {
  color: #0284c7;
  background: #f0f9ff;
  border-color: #bae6fd;
  transform: translateY(-1px);
}
.nav-hyperlink:hover svg {
  transform: scale(1.12);
  color: #0369a1;
}
.nav-hyperlink.active {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #7dd3fc;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-pwa-install {
  background: #e0f2fe;
  border: 1.5px solid #7dd3fc;
  color: #0369a1;
  font-weight: 700;
  font-size: 12.5px;
  padding: 6px 13px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-pwa-install svg {
  color: #0284c7;
}
.btn-pwa-install:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28);
}
.btn-pwa-install:hover svg {
  color: #ffffff;
}

.subpage-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  flex: 1;
  width: 100%;
}
.subpage-hero {
  text-align: center;
  padding: 40px 20px 30px;
  background: rgba(11, 16, 25, 0.7);
  border: 1px solid var(--border-main);
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.subpage-hero h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  margin: 0 0 12px;
  color: #ffffff;
}
.subpage-hero p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.6;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}
.feature-card:hover {
  border-color: var(--accent-carolina);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.feature-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #ffffff;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-carolina);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.action-link:hover {
  text-decoration: underline;
}

.search-box-large {
  display: flex;
  gap: 10px;
  max-width: 700px;
  margin: 20px auto 0;
}
.search-input-large {
  flex: 1;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-main);
  border-radius: 10px;
  color: #ffffff;
  padding: 12px 18px;
  font-size: 16px;
  outline: none;
}
.search-input-large:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}
.search-btn-large {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
}

.site-footer {
  background: #ffffff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 2px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05);
  padding: 48px 24px 32px;
  margin-top: 60px;
  color: #1e293b;
  position: relative;
  z-index: 10;
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.site-footer .brand-title {
  color: #0f172a !important;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.site-footer p {
  color: #475569 !important;
  line-height: 1.65;
}
.site-footer h4,
.site-footer .footer-col > div[style*="font-weight:700"] {
  color: #0f172a !important;
  letter-spacing: 0.5px;
}
.site-footer ul li a {
  color: #334155 !important;
  transition: all 0.15s ease;
  display: inline-block;
  padding: 2px 0;
}
.site-footer ul li a:hover {
  color: #0284c7 !important;
  transform: translateX(2px);
}
.site-footer-divider,
.site-footer .footer-inner > div:last-child {
  border-top: 1px solid #e2e8f0 !important;
  margin-top: 32px !important;
  padding-top: 24px !important;
  text-align: center !important;
  font-size: 12.5px !important;
  color: #64748b !important;
}

@media (max-width: 768px) {
  .mode-switcher { display: none !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .subpage-hero h1 { font-size: 24px; }
  .search-box-large { flex-direction: column; }
  .site-footer { padding: 36px 16px calc(var(--mobile-nav-height, 64px) + 24px); }
}
