/* 全局样式 */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

body {
    background: #f7f8fa;
    min-height: 100vh;
    width: 100%;
}

/* 渐变头部样式 */
.header-gradient {
    background-image: linear-gradient(to right top, #d16ba5, #c777b9, #ba83ca, #aa8fd8, #9a9ae1, #8aa7ec, #79b3f4, #69bff8, #52cffe, #41dfff, #46eefa, #5ffbf1);
    color: #fff;
    padding: 80px 0 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 星星闪烁效果 */
.meteor {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px #fff, 0 0 16px #fff, 0 0 24px rgba(255,255,255,0.5);
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.header-gradient h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header-gradient p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* 网站列表样式 */
/* 基础重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* 移动端样式优化 */
@media (max-width: 767px) {
    .container {
        padding: 0 10px;
    }
    
    /* 确保头部在移动端全屏显示 */
    .header-gradient {
        padding: 60px 15px 60px 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 防止iOS Safari下的底部安全区域问题 */
    body {
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }
}

/* 网站卡片列表样式 */
.site-list {
    margin-top: 30px;
    /* 使用CSS Grid确保在大屏幕上每行显示4个卡片 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25%, 1fr));
    gap: 20px;
}

/* 为不同屏幕尺寸设置不同的列数 */
@media (max-width: 1199px) {
    .site-list {
        grid-template-columns: repeat(auto-fit, minmax(33.333%, 1fr));
    }
}

@media (max-width: 991px) {
    .site-list {
        grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
    }
}

@media (max-width: 767px) {
    /*.site-list {*/
    /*    grid-template-columns: 1fr;*/
    /*}*/
}

/* 按钮基础样式 */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    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;
    text-decoration: none;
}

.btn-light {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.btn-outline-light {
    color: #f8f9fa;
    background-color: transparent;
    background-image: none;
    border-color: #f8f9fa;
}

.btn-light:hover,
.btn-outline-light:hover {
    opacity: 0.9;
}

.btn-lg {
    padding: 0.5rem 1.5rem;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 0.3rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* 卡片样式 */
.site-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(160,132,232,0.08);
    padding: 22px 20px 18px 20px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.site-card .site-link-row{
    line-height: 23px;
}

.site-card:hover {
    box-shadow: 0px 0px 12px rgb(68 0 241);
}

.site-card .site-card-link {
    text-decoration: none;
}

.site-header-row {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.site-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7b61ff 0%, #4f8cff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 16px 0 rgba(79,140,255,0.13);
    margin-right: 12px;
    flex-shrink: 0;
}

.site-title-row {
    display: block;
    min-width: 0;
}

.site-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
    margin-right: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.site-category {
    font-size: 0.75rem;
    color: rgb(70 35 141);
    background: #e3ddf9;
    border-radius: 16px;
    padding: 2px 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0;
    margin-left: 0;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 4px 0 rgba(123,97,255,0.08);
}

.site-desc {
    color: #777;
    font-size: 0.75rem;
    min-height: 28px;
    line-height: 28px;
    max-height: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-link {
    font-size: 0.75rem;
    color: #989898;
    text-decoration: none;
    word-break: break-all;
    background: none;
    border: none;
    padding: 0;
    display: inline-block;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.site-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

/* 复制按钮样式 */
.btn-copy {
    background: #f2f4f8;
    color: #4f8cff;
    border: none;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    float: right;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 复制图标样式 */
.btn-copy svg {
    width: 14px;
    height: 14px;
    fill: none;
    vertical-align: middle;
}

.btn-copy:hover {
    background: #4f8cff;
    color: #fff;
}

.footer {
    color: #aaa;
    font-size: 0.98rem;
    margin: 40px 0 16px 0;
    text-align: center;
}

/* 容器响应式样式 */
.container {
    max-width: 1200px; /* PC端最大宽度 */
    margin: 0 auto;
    padding: 0 15px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .header-gradient h1 { 
        font-size: 2rem; 
    }
    .site-card { 
        padding: 16px 10px 14px 10px; 
    }
    /* 移动端不需要最大宽度限制，保持全屏 */
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
}