/* ============ 全局样式 ============ */
* {
    margin: 0;
    padding: 0;
}

body {
    background: #f2f2f2;
    font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    padding-bottom: 50px;
}

/* ============ 顶部导航 ============ */
.header {
    background: linear-gradient(135deg, #1e9fff, #009688);
    padding: 20px 0 40px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.header-title {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-title i {
    margin-right: 10px;
}

.header-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    letter-spacing: 2px;
}

.header-status {
    display: inline-block;
    margin-top: 15px;
    padding: 5px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.header-status i {
    margin-right: 5px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============ 主容器 ============ */
.container {
    max-width: 1200px;
    margin: -20px auto 0;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* ============ 统计卡片 ============ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1e9fff;
    display: block;
}

.stat-label {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
    display: block;
}

.stat-card:nth-child(2) .stat-number { color: #ffb800; }
.stat-card:nth-child(3) .stat-number { color: #5fb878; }
.stat-card:nth-child(4) .stat-number { color: #ff6b6b; }

/* ============ 内容网格 ============ */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ 卡片通用样式 ============ */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header-title .layui-icon {
    color: #1e9fff;
    font-size: 20px;
}

.card-header-badge {
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 12px;
    background: #f0f0f0;
    color: #666;
}

.card-body {
    padding: 20px;
}

/* ============ API功能列表 ============ */
.api-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.api-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 3px solid #1e9fff;
    flex-wrap: wrap;
    gap: 10px;
}

.api-item:hover {
    background: #e8f4ff;
    transform: translateX(5px);
}

.api-item .method {
    padding: 2px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    min-width: 50px;
    text-align: center;
}

.method.get { background: #5fb878; }
.method.post { background: #1e9fff; }
.method.put { background: #ffb800; }
.method.delete { background: #ff6b6b; }

.api-item .api-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
    min-width: 120px;
}

.api-item .api-desc {
    font-size: 13px;
    color: #999;
    flex: 2;
    min-width: 150px;
}

.api-item .api-tag {
    font-size: 11px;
    padding: 1px 10px;
    border-radius: 10px;
    background: #e8e8e8;
    color: #666;
}

.api-item .api-tag.hot {
    background: #ff6b6b;
    color: #fff;
}

.api-item .api-tag.new {
    background: #5fb878;
    color: #fff;
}

@media (max-width: 480px) {
    .api-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .api-item .api-desc {
        flex: none;
        width: 100%;
    }
}

/* ============ 作者信息卡片 ============ */
.author-card {
    text-align: center;
    padding: 10px 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(30, 159, 255, 0.3);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.author-role {
    font-size: 13px;
    color: #999;
    margin: 5px 0 15px;
}

.author-info {
    text-align: left;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.author-info-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.author-info-item:last-child {
    border-bottom: none;
}

.author-info-item .label {
    color: #999;
}

.author-info-item .value {
    color: #333;
    font-weight: 500;
}

.author-info-item .value a {
    color: #1e9fff;
    text-decoration: none;
}

.author-info-item .value a:hover {
    text-decoration: underline;
}

/* ============ 公告 ============ */
.notice-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    align-items: flex-start;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 4px;
    padding: 12px 10px;
}

.notice-item:hover {
    background: #f8f9fa;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-icon {
    color: #ffb800;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notice-content {
    flex: 1;
    min-width: 0;
}

.notice-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-time {
    font-size: 12px;
    color: #bbb;
    display: block;
    margin-top: 4px;
}

.notice-desc {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.notice-more {
    color: #1e9fff;
    font-size: 12px;
    margin-top: 4px;
    display: inline-block;
}

/* ============ 底部 ============ */
.footer {
    text-align: center;
    padding: 30px 20px 10px;
    color: #bbb;
    font-size: 13px;
}

.footer a {
    color: #1e9fff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ============ 加载动画 ============ */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-mask.show {
    display: flex;
}

.loading-box {
    background: #fff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    min-width: 200px;
}

.loading-box .layui-icon {
    font-size: 40px;
    color: #1e9fff;
}

.loading-box p {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* ============ 响应式调整 ============ */
@media (max-width: 576px) {
    .header-title {
        font-size: 24px;
    }
    .header-desc {
        font-size: 13px;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-number {
        font-size: 22px;
    }
    .card-header {
        padding: 12px 15px;
    }
    .card-body {
        padding: 15px;
    }
    .loading-box {
        padding: 30px 25px;
        min-width: auto;
        margin: 0 20px;
    }
}

/* ============ 滚动条美化 ============ */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}