/* 主样式文件 - 保持原有设计风格 */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f8f8;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* 导航样式 */
.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #f97316; /* Tailwind orange-500 */
}

/* 按钮样式 */
.btn-primary {
    background-color: #f97316; /* Tailwind orange-500 */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: #ea580c; /* Tailwind orange-600 */
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* 标题样式 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c; /* Tailwind gray-900 */
    margin-bottom: 2rem;
    text-align: center;
}

/* 语言切换器 */
.language-switcher select {
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.language-switcher select:focus {
    border-color: #f97316;
}

/* 加载动画 */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #f97316;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式视频容器 */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 格式化消息样式 */
.formatted-message {
    line-height: 1.7;
    font-family: 'Noto Sans CJK SC', 'Hiragino Sans', 'Yu Gothic', 'Segoe UI', system-ui, sans-serif;
}

.formatted-message .empty-line {
    height: 12px;
    margin: 6px 0;
}

.formatted-message .section-header {
    font-size: 1.15em;
    font-weight: 600;
    margin: 20px 0 12px 0;
    padding: 10px 0 8px 0;
    border-bottom: 2px solid #f97316;
    color: #2c3e50;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.05) 0%, transparent 100%);
    padding-left: 8px;
    border-radius: 4px 0 0 4px;
}

.formatted-message .text-line {
    margin: 8px 0;
    padding: 2px 0;
    color: #34495e;
}

.formatted-message .list-item {
    margin: 10px 0;
    padding: 6px 0 6px 15px;
    position: relative;
    background: rgba(52, 152, 219, 0.02);
    border-left: 3px solid #3498db;
    border-radius: 0 4px 4px 0;
}

.formatted-message .list-item.numbered {
    color: #2980b9;
    font-weight: 500;
}

.formatted-message .list-item.bullet {
    color: #27ae60;
}

.formatted-message .list-item span {
    color: #2c3e50;
    font-weight: normal;
}

.formatted-message strong {
    color: #f97316;
    font-weight: 600;
}

.formatted-message em {
    color: #8e44ad;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .formatted-message .section-header {
        font-size: 1.1em;
        margin: 15px 0 10px 0;
        padding: 8px 0 6px 6px;
    }

    .formatted-message .list-item {
        padding: 4px 0 4px 12px;
        margin: 8px 0;
    }
}

/* ========================================
   SEO优化样式
   ======================================== */

/* 面包屑导航样式 */
.breadcrumb-nav {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    margin: 10px 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #666;
}

.breadcrumb-item a {
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #e55a2b;
    text-decoration: underline;
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin-left: 8px;
    color: #999;
    font-weight: bold;
}

.breadcrumb-item[aria-current="page"] {
    color: #333;
    font-weight: 500;
}

/* 结构化标题优化 */
h1, h2, h3, h4, h5, h6 {
    scroll-margin-top: 80px; /* 锚点链接偏移 */
}

/* 图片懒加载优化 */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

/* 跳转链接（无障碍访问） */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* 性能优化：关键CSS内联 */
.critical-content {
    display: block;
}

.non-critical-content {
    display: none;
}

.non-critical-content.loaded {
    display: block;
}

/* SEO友好的隐藏文本 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 结构化数据可视化（开发用） */
.structured-data-debug {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    max-width: 300px;
    z-index: 9999;
    display: none;
}

.structured-data-debug.show {
    display: block;
}
