/* HueCub shared base styles — wBuyBuy Blue Bear + Crayon Colors theme */
/* wBuyBuy 蓝熊色值: 主蓝 #336699 (from favicon), 深蓝 #003366, 浅蓝 #6699CC */
:root {
  --primary: #336699;
  --primary-hover: #2A567F;
  --primary-light: #6699CC;
  --primary-gradient: linear-gradient(135deg, #336699, #5588AA);
  --accent: #22C55E;
  --accent-warm: #F59E0B;
  --accent-rose: #EF4444;
  --accent-purple: #8B5CF6;
  --accent-orange: #F97316;
  --bg: #FEFEFE;
  --primary-deep: #003366;
  --bg-alt: #F0F5FA;
  --surface: #FFFFFF;
  --surface-hover: #F8FBFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #D0DFEF;
  --radius: 20px;
  --radius-btn: 50px;
  --radius-input: 14px;
  --shadow: 0 4px 16px rgba(0, 51, 102, 0.08);
  --shadow-hover: 0 8px 28px rgba(0, 51, 102, 0.14);
  --max-w: 1100px;
}

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

body {
  font-family: 'Nunito', 'Noto Sans SC', sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Navbar ── */
.navbar {
  background: var(--primary-gradient);
  padding: 14px 0;
  box-shadow: 0 3px 12px rgba(100, 60, 30, 0.12);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.8em;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* wBuyBuy Blue Bear logo image */
.logo-img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  animation: bear-wiggle 3s ease-in-out infinite;
}
.logo-img:hover {
  animation: bear-spin 0.6s ease-in-out;
}

/* CSS Blue Bear fallback (hidden when logo-img loads) */
.logo-bear {
  width: 42px;
  height: 42px;
  position: relative;
  background: #D0DFEF;
  border-radius: 50%;
  border: 2px solid #99BBDD;
  box-shadow: 0 0 0 2px #336699;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  animation: bear-wiggle 3s ease-in-out infinite;
}
.logo-bear::before, .logo-bear::after {
  content: '';
  position: absolute;
  background: #336699;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  top: -5px;
}
.logo-bear::before { left: 4px; }
.logo-bear::after { right: 4px; }

.logo-bear-face {
  width: 24px;
  height: 18px;
  position: relative;
  z-index: 1;
}
.logo-bear-eyes {
  position: absolute;
  width: 4px;
  height: 5px;
  background: #1E293B;
  border-radius: 50%;
  top: 3px;
}
.logo-bear-eyes.left { left: 4px; }
.logo-bear-eyes.right { right: 4px; }
.logo-bear-cheeks {
  position: absolute;
  width: 7px;
  height: 5px;
  background: rgba(102, 153, 204, 0.35);
  border-radius: 50%;
  top: 8px;
}
.logo-bear-cheeks.left { left: 0; }
.logo-bear-cheeks.right { right: 0; }
.logo-bear-nose {
  position: absolute;
  width: 6px;
  height: 4px;
  background: #1E293B;
  border-radius: 50%;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}

/* Paintbrush accent */
.logo-bear-brush {
  position: absolute;
  right: -8px;
  bottom: -2px;
  width: 4px;
  height: 18px;
  background: #8B6914;
  border-radius: 2px;
  transform: rotate(-30deg);
  z-index: 2;
}
.logo-bear-brush::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -2px;
  width: 8px;
  height: 8px;
  background: #336699;
  border-radius: 3px 3px 1px 1px;
}

@keyframes bear-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}
.logo-bear:hover {
  animation: bear-spin 0.6s ease-in-out;
}
@keyframes bear-spin {
  0% { transform: rotate(0); }
  50% { transform: rotate(15deg) scale(1.1); }
  100% { transform: rotate(0); }
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-tool-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

/* Language dropdown */
.lang-dropdown {
  position: relative;
}
.lang-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lang-btn:hover { background: rgba(255,255,255,0.35); }
.lang-menu {
  display: none;
  position: absolute;
  top: 44px;
  right: 0;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  min-width: 130px;
  overflow: hidden;
  z-index: 200;
}
.lang-menu.open { display: block; }
.lang-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.15s;
}
.lang-menu a:hover { background: var(--bg-alt); }

/* ── Footer ── */
.site-footer {
  background: var(--primary-gradient);
  color: rgba(255,255,255,0.9);
  padding: 32px 20px;
  text-align: center;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}
.footer-content { position: relative; z-index: 1; }
.footer-content p {
  font-size: 0.9rem;
  line-height: 1.6;
}
.footer-content a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Footer bear */
.footer-bear-illustration {
  position: absolute;
  left: 24px;
  bottom: 12px;
  opacity: 0.25;
}
.footer-bear-face-small {
  width: 35px;
  height: 30px;
  background: #fff;
  border-radius: 50%;
  position: relative;
}
.footer-bear-face-small::before, .footer-bear-face-small::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  top: -4px;
}
.footer-bear-face-small::before { left: 3px; }
.footer-bear-face-small::after { right: 3px; }
.footer-bear-eyes-small {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  top: 10px;
}
.footer-bear-eyes-small.left { left: 8px; }
.footer-bear-eyes-small.right { right: 8px; }
.footer-bear-nose-small {
  position: absolute;
  width: 5px;
  height: 3px;
  background: var(--primary);
  border-radius: 50%;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}
.footer-bear-cheeks-small {
  position: absolute;
  width: 6px;
  height: 4px;
  background: rgba(244, 196, 107, 0.4);
  border-radius: 50%;
  top: 14px;
}
.footer-bear-cheeks-small.left { left: 3px; }
.footer-bear-cheeks-small.right { right: 3px; }

/* ── Utilities ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar-content { padding: 0 12px; }
  .logo { font-size: 1.4em; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .nav-links a { font-size: 0.8rem; }
  .nav-links { gap: 10px; }
}
