/* ============================================
   页面特定样式
   包含各个页面独有的样式
   ============================================ */

/* ----------------------------------------
   Festival 页面特定样式
   ---------------------------------------- */

/* API 展示区域 */
.api-showcase {
    text-align: center;
    margin: 30px 0;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
}

.api-showcase img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.api-showcase p {
    margin-top: 15px;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* URL 示例块 */
.url-example {
    background: var(--gray-800);
    color: var(--gray-100);
    padding: 16px 20px;
    border-radius: 12px;
    margin: 16px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

.url-example a {
    color: var(--accent-500);
    text-decoration: none;
}

.url-example a:hover {
    text-decoration: underline;
}

/* HTTP 方法标签 */
.method-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

.method-get {
    background: var(--success);
    color: white;
}

.method-post {
    background: var(--primary-500);
    color: white;
}

.method-default {
    background: var(--gray-400);
    color: white;
}

/* 提示框 */
.tip-box {
    background: #fef3c7;
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid #f59e0b;
    margin: 20px 0;
}

.tip-box code {
    background: rgba(255,255,255,0.5);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

/* 信息框 */
.info-box {
    background: #d1fae5;
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--success);
    margin: 20px 0;
}

/* 节日卡片 */
.festival-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--gray-200);
}

.festival-card h4 {
    color: var(--gray-800);
    margin-bottom: 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.festival-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.data-table code {
    background: var(--gray-200);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8em;
}

/* ----------------------------------------
   Fonts Demo 页面特定样式
   ---------------------------------------- */

/* 修复字体 CSS 覆盖 font-awesome 图标的问题 */
i.fa-solid, i.fa-brands, i.fa-regular, i.fa-light, i.fa-thin, i.fa-duotone,
svg.fa-solid, svg.fa-brands, svg.fa-regular, svg.fa-light, svg.fa-thin, svg.fa-duotone {
    font-family: 'Font Awesome 7 Free', 'Font Awesome 7 Brands', 'FontAwesome', 'Font Awesome 6 Free', 'Font Awesome 6 Brands';
}

i.fa-solid, svg.fa-solid {
    font-weight: 900;
}

/* Header 区域文本使用默认字体 */
.site-header .header-title,
.site-header .nav-link span {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 字体列表 */
.font-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.font-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
    cursor: pointer;
}

.font-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-500);
    transform: translateY(-2px);
}

.font-item.active {
    background: var(--primary-50);
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.1);
}

.font-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}

.font-item p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

/* 字体控制区 */
.font-controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.font-controls label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
    display: block;
}

.font-controls input,
.font-controls select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    background: #ffffff;
}

/* 字体预览区 */
.font-preview {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.font-preview p {
    margin: 0;
    color: var(--gray-600);
}

.font-preview .size-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-left: 8px;
}

/* 字体大小行 */
.font-sizes {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.font-size-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.font-size-row:last-child {
    border-bottom: none;
}

.font-size-row span:first-child {
    color: var(--gray-400);
    font-size: 0.75rem;
    min-width: 40px;
    text-align: right;
}

.font-size-row span:last-child {
    color: #ccc;
    font-size: 0.75rem;
}
