/* shared.css - 全局共享样式 */

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 链接样式 */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: "Montserrat", sans-serif; /* Example for a different heading font */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 700;
    line-height: 1.2;
    color: #212529;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* 段落和列表 */
p {
    margin-bottom: 1em;
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 1em;
}

ul li, ol li {
    margin-bottom: 0.5em;
}

/* 容器和布局 */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.space-x-4 > *:not(:first-child) { margin-left: 1rem; }
.space-y-4 > *:not(:first-child) { margin-top: 1rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) {
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:block { display: block; }
    .md\:hidden { display: none; }
}

/* 按钮样式 */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #007bff;
    border: 1px solid #007bff;
    padding: 0.6em 1.2em;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-outline-primary {
    color: #007bff;
    background-color: transparent;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* 表单元素 */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    display: block;
    width: 100%;
    padding: 0.6em 0.8em;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 辅助类 (Tailwind-like for demonstration) */
.bg-primary { background-color: #007bff; }
.text-white { color: #fff; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.underline { text-decoration: underline; }
.ml-2 { margin-left: 0.5rem; }
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important; }
.bg-white { background-color: #fff; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.h-8 { height: 2rem; }
.mr-2 { margin-right: 0.5rem; }
.text-2xl { font-size: 1.5rem; } /* 24px */
.font-bold { font-weight: 700; }
.text-gray-800 { color: #2d3748; }
.text-gray-700 { color: #4a5568; }
.hover\:text-primary-600:hover { color: #0056b3; }
.font-medium { font-weight: 500; }
.p-2 { padding: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.hover\:bg-gray-100:hover { background-color: #f7fafc; }
.h-5 { height: 1.25rem; }
.w-5 { width: 1.25rem; }
.text-gray-600 { color: #718096; }
.h-6 { height: 1.5rem; }
.w-6 { width: 1.5rem; }
.mobile-menu-overlay {
    position: absolute;
    width: 100%;
    z-index: 1000;
    left: 0;
    top: var(--header-height, 60px); /* Placeholder for JS to set actual header height */
}
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.space-y-4 > *:not(:first-child) { margin-top: 1rem; }
.text-lg { font-size: 1.125rem; } /* 18px */
.mt-4 { margin-top: 1rem; }
.w-full { width: 100%; }
.bg-gray-900 { background-color: #1a202c; }
.text-gray-300 { color: #cbd5e0; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.gap-8 { gap: 2rem; }
.mb-8 { margin-bottom: 2rem; }
.text-lg { font-size: 1.125rem; }
.font-semibold { font-weight: 600; }
.mb-4 { margin-bottom: 1rem; }
.text-sm { font-size: 0.875rem; }
.leading-relaxed { line-height: 1.625; }
.text-primary-400 { color: #63b3ed; }
.hover\:text-primary-500:hover { color: #4299e1; }
.space-y-2 > *:not(:first-child) { margin-top: 0.5rem; }
.text-gray-400 { color: #a0aec0; }
.hover\:text-white:hover { color: #fff; }
.transition { transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; }
.duration-300 { transition-duration: 300ms; }
.mt-8 { margin-top: 2rem; }
.border-t { border-top-width: 1px; }
.border-gray-700 { border-color: #4a5568; }
.pt-8 { padding-top: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.text-xs { font-size: 0.75rem; }
.text-gray-500 { color: #a0aec0; } /* Adjusted for better contrast on dark background */

/* Custom primary color variables */
:root {
    --color-primary-50: #e0f2fe;
    --color-primary-100: #bfdbfe;
    --color-primary-200: #93c5fd;
    --color-primary-300: #60a5fa;
    --color-primary-400: #3b82f6;
    --color-primary-500: #2563eb; /* Main primary */
    --color-primary-600: #1d4ed8;
    --color-primary-700: #1e40af;
    --color-primary-800: #1e3a8a;
    --color-primary-900: #1e306a;
}
.bg-primary { background-color: var(--color-primary-500); }
.text-primary-600 { color: var(--color-primary-600); }
.hover\:text-primary-600:hover { color: var(--color-primary-600); }
.btn-primary { background-color: var(--color-primary-500); border-color: var(--color-primary-500); }
.btn-primary:hover { background-color: var(--color-primary-600); border-color: var(--color-primary-600); }
.btn-outline-primary { color: var(--color-primary-500); border-color: var(--color-primary-500); }
.btn-outline-primary:hover { background-color: var(--color-primary-500); border-color: var(--color-primary-500); color: #fff; }
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
