* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #0a0e1a;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 星星粒子容器 */
.star-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px #fff, 0 0 20px #00d2ff, 0 0 30px #00d2ff;
    animation: star-fade 1s ease-out forwards;
}

@keyframes star-fade {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
}

/* 星星拖尾 */
.star-trail {
    position: fixed;
    width: 2px;
    height: 2px;
    background: linear-gradient(to bottom, #fff, transparent);
    pointer-events: none;
    z-index: 9998;
    border-radius: 50%;
    animation: trail-fade 0.6s ease-out forwards;
}

@keyframes trail-fade {
    0% {
        opacity: 0.8;
        transform: scaleY(1);
    }
    100% {
        opacity: 0;
        transform: scaleY(0.5);
    }
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 头部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, #1a1f3a 0%, #0a0e1a 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-item {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
}

/* 主内容区 */
.main-content {
    position: relative;
    z-index: 10;
    padding: 100px 40px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.page {
    display: none;
    animation: fadeIn 0.3s;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 卡片通用样式 */
.welcome-card,
.search-card,
.list-card,
.types-card {
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1428 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

h1, h2 {
    color: #fff;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-card h1 {
    font-size: 36px;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-card p {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    margin-bottom: 40px;
}

/* 统计卡片 */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
    background: rgba(0, 210, 255, 0.05);
    padding: 30px 50px;
    border-radius: 15px;
    border: 1px solid rgba(0, 210, 255, 0.1);
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 10px;
}

/* 按钮 */
.btn-search,
.btn-search-main,
.btn-refresh {
    background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 100%);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 210, 255, 0.3);
}

.btn-search:hover,
.btn-search-main:hover,
.btn-refresh:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 210, 255, 0.5);
}

.btn-refresh {
    padding: 10px 20px;
    font-size: 13px;
}

/* 搜索框 */
.search-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tab {
    padding: 10px 25px;
    border: 1px solid rgba(0, 210, 255, 0.3);
    background: rgba(0, 210, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.tab.active,
.tab:hover {
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    border-color: transparent;
    color: #fff;
}

.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    transform: scale(0.75);
    transform-origin: center top;
    justify-content: center;
}

.search-input,
.type-select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.3s;
}

.search-input:focus,
.type-select:focus {
    border-color: #00d2ff;
    outline: none;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.type-select {
    flex: 0 0 200px;
}

.type-select option {
    background: #1a1f3a;
    color: #fff;
}

/* 结果展示 */
.results {
    margin-top: 20px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-right: 10px;
}

.results::-webkit-scrollbar {
    width: 8px;
}

.results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.results::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.3);
    border-radius: 4px;
}

.results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 210, 255, 0.5);
}

.search-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* 物品网格 */
.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.item-card {
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1428 100%);
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    cursor: pointer;
    overflow: hidden;
    height: 180px !important;
    display: flex;
    flex-direction: column;
}
.item-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 210, 255, 0.4),
                0 0 30px rgba(0, 210, 255, 0.3),
                inset 0 0 20px rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.6);
}

/* 鼠标移动光晕效果 */
.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(0, 210, 255, 0.15) 0%, 
                transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    border-radius: 15px;
}

.item-card:hover::before {
    opacity: 1;
}

/* 卡片内容发光效果 */
.item-card:hover .item-card-image {
    filter: brightness(1.1) drop-shadow(0 0 10px rgba(0, 210, 255, 0.5));
}

.item-card:hover .item-tag {
    background: rgba(0, 210, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
    transform: scale(1.05);
}

.item-card-img {
    width: 100%;
    height: 120px !important;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.item-card-image {
    width: 100%;
    height: 120px !important;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    box-sizing: border-box;
}

.item-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    flex: 1;
}

.item-card h3 {
    color: #fff;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 600;
    text-align: right;
    align-self: flex-end;
    width: 100%;
}

.item-card .item-id {
    color: #ffd700 !important;
    font-size: 10px !important;
    margin-bottom: 6px !important;
    font-family: 'Courier New', monospace !important;
    font-weight: 600 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: left !important;
    align-self: flex-start !important;
}

.item-card p {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    margin-bottom: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-align: left !important;
    align-self: flex-start !important;
    padding-bottom: 20px !important;
    width: 100% !important;
}

.item-tag {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(0, 210, 255, 0.15);
    color: #00d2ff;
    border-radius: 4px;
    font-size: 9px;
    border: 1px solid rgba(0, 210, 255, 0.3);
    position: absolute;
    top: 5px;
    left: 5px;
    margin: 0;
}

/* 分类网格 */
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.type-card {
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1428 100%);
    color: #fff;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.type-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.3);
    border-color: rgba(0, 210, 255, 0.3);
}

.type-card .type-name {
    font-size: 13px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.type-card .type-count {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 分页 */
.list-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.page-size-input {
    width: 80px;
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    padding: 10px 20px;
    border: 1px solid rgba(0, 210, 255, 0.3);
    background: rgba(0, 210, 255, 0.05);
    color: #00d2ff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn.active,
.page-btn:hover {
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    border-color: transparent;
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1428 100%);
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 30px;
    top: 20px;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.close:hover {
    color: #00d2ff;
}

.modal-item h3 {
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 24px;
}

.modal-item-row {
    margin-bottom: 15px;
}

.modal-item-label {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-size: 13px;
}

.modal-item-value {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #00d2ff;
    font-size: 18px;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #00d2ff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* 结果计数 */
.result-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-bottom: 15px;
}

/* 无结果 */
.no-results, .error {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 768px) {
    .header {
        padding: 0 20px;
    }

    .logo {
        font-size: 18px;
    }

    .nav {
        gap: 15px;
    }

    .nav-item {
        font-size: 13px;
        padding: 6px 12px;
    }

    .main-content {
        padding: 80px 20px 20px;
    }

    .welcome-card,
    .search-card,
    .list-card,
    .types-card {
        padding: 25px;
    }

    .stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 36px;
    }

    .search-box {
        flex-direction: column;
    }

    .type-select {
        flex: 1;
    }

    .items-grid,
    .types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .item-card {
        height: 220px !important;
    }

    .item-card-image {
        height: 120px !important;
    }
}
