* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary: #3a6ea5;
    --primary-light: #5a8ec9;
    --secondary: #f47d31;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #333333;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --highlight: #e6f0fa;
}

body {
    background-color: #f5f7fa;
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 40px;
}

.container {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

/* 搜索和筛选区域 */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 25px 0;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.1);
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.filter-btn {
    padding: 10px 18px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--light-bg);
    border-color: var(--primary-light);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 统计信息 */
.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sort-options {
    display: flex;
    gap: 15px;
}

.sort-options select {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 12px;
    background: white;
    color: var(--text);
    font-size: 0.9rem;
}

/* 舰船网格布局 */
.ships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.ship-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ship-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.ship-header {
    background: var(--light-bg);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.ship-image {
    height: 130px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e6f0fa 0%, #d4e4f5 100%);
}

.ship-image img {
    width: 100%; /* 宽度100%填充容器 */
    height: 100%; /* 高度100%填充容器 */
    object-fit: cover; /* 完全覆盖容器，可能裁剪部分内容 */
    display: block; /* 消除图片底部间隙 */
    transition: transform 0.5s ease;
    filter: brightness(1.1); /* 降低图片亮度至80% */
}

.ship-card:hover .ship-image img {
    transform: scale(1.08);
}

/*.ship-image::before {*/
/*    content: "";*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    background: radial-gradient(circle at center,*/
/*    rgba(255, 255, 255, 0.4) 0%,*/
/*    rgba(255, 255, 255, 0) 70%);*/
/*    z-index: 1;*/
/*}*/

/*.ship-image::after {*/
/*    content: "";*/
/*    position: absolute;*/
/*    bottom: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 40%;*/
/*    background: linear-gradient(to top,*/
/*    rgba(0, 0, 0, 0.05) 0%,*/
/*    rgba(0, 0, 0, 0) 100%);*/
/*    z-index: 2;*/
/*}*/

.ship-card:hover .ship-image img {
    transform: scale(1.05);
}

.ship-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);

    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 1.6em;
}

.ship-type {
    font-size: 0.85rem;
    background: rgba(58, 110, 165, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;

    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ship-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.faction {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.faction i {
    color: var(--secondary);
}

.ship-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    /*margin-bottom: 20px;*/

    /* 限制最多显示两行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.2em; /* 2行 x 1.6行高 */
}

.ship-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.stat {
    display: flex;
    flex-direction: column;
    background: var(--light-bg);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.stat-label {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-weight: 600;
    color: var(--text);
}

.ship-footer {
    padding: 12px 15px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-level {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.view-btn {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: var(--secondary);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: var(--light-bg);
    border-color: var(--primary-light);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ships-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .controls {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .ships-grid {
        grid-template-columns: 1fr;
    }

    .category-filters {
        overflow-x: auto;
        padding-bottom: 10px;
        width: 100%;
        scrollbar-width: thin;
    }

    .stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 图片样式控制 */
.splash-logo-image {
    max-width: 350px;  /* 控制图片最大宽度 */
    width: 30vw;      /* 响应式宽度 */
    height: auto;      /* 保持比例 */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5)); /* 与文字相同的发光效果 */
}

@media (max-width: 768px) {
    .splash-logo-name {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .splash-logo-name {
        font-size: 1rem;
    }
}

.splash-logo-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.logo:hover .logo-text::after {
    transform: scaleX(1);
}

:root {
    --space-dark: #0a0e17;
    --space-blue: #0d1b2a;
    --neon-blue: #00eeff;
    --neon-purple: #8a2be2;
    --star-yellow: #ffd700;
    --light-gray: #e0e1dd;
    --transition: all 0.3s ease;
}


/* 舰船卡片加载动画 */
.ship-card {
    opacity: 0;
    transform: translateY(20px);
    /* 使用 CSS 变量设置动态延迟 */
    animation: fadeInUp 0.6s ease forwards;
    /* 默认延迟，会被 JavaScript 覆盖 */
    animation-delay: calc(var(--card-index, 0) * 0.1s);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 图片加载优化 */
.ship-image img {
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.ship-image img.loading {
    opacity: 0;
}

.ship-image img.loaded {
    opacity: 1;
}


/* 添加到 app.css 中 */

/* 高亮样式 */
.ship-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    position: relative;
    transition: all 0.3s ease;
}

/* 当有搜索匹配时，显示完整文本 */
.ship-description.search-match {
    -webkit-line-clamp: unset;
    overflow: visible;
    max-height: none;
}

/* 高亮样式 */
.highlight {
    background-color: #ffeb3b;
    color: #333;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}


/* 页脚样式 - 白色配色版本 */
footer {
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
    color: #333333;
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
    position: relative;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3a6ea5, transparent);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
}

.footer-content .splash-logo-image {
    max-width: 100px;
    filter: drop-shadow(0 0 8px rgba(58, 110, 165, 0.3));
    transition: transform 0.3s ease;
}

.footer-content .splash-logo-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px rgba(58, 110, 165, 0.5));
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    color: #3a6ea5;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    background: linear-gradient(135deg, #3a6ea5, #5a8ec9);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(58, 110, 165, 0.4);
}

.copyright {
    font-size: 1rem;
    line-height: 1.6;
    color: #666666;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    width: 100%;
}

.copyright a {
    color: #3a6ea5;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.copyright a:hover {
    color: #f47d31;
    text-shadow: 0 0 8px rgba(244, 125, 49, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    footer {
        padding: 30px 0 15px;
    }

    .social-links {
        gap: 15px;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .copyright {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 25px 0 10px;
    }

    .social-links {
        gap: 12px;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .copyright {
        font-size: 0.75rem;
    }
}