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

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    background: #0a0e1a;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: #e0e6ed;
    line-height: 1.6;
}

/* 星星粒子容器 */
.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: 64px;
    background: rgba(15, 20, 40, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, #00d2ff, #7928ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

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

.nav-item {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

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

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

.page {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.active {
    display: block;
}

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

/* 卡片通用样式 - 毛玻璃 */
.welcome-card,
.search-card,
.list-card,
.types-card {
    background: rgba(20, 25, 45, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

h1, h2 {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}

.welcome-card h1 {
    display: none;
}

.welcome-card p {
    display: none;
}

.welcome-card {
    padding: 20px 35px 35px 35px;
}

/* 搜索区域紧凑化 */
.search-card {
    padding-top: 15px !important;
}
.search-card h2 {
    display: none;
}

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

.stat-item {
    text-align: center;
    background: rgba(0, 210, 255, 0.06);
    padding: 35px 60px;
    border-radius: 20px;
    border: 1px solid rgba(0, 210, 255, 0.15);
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 210, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.15);
}

.stat-number {
    font-size: 52px;
    font-weight: 800;
    background: linear-gradient(90deg, #00d2ff, #7928ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 按钮 */
.btn-search,
.btn-search-main,
.btn-refresh {
    position: relative;
    background: linear-gradient(135deg, #00d2ff 0%, #7928ca 100%);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    overflow: hidden;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* 按钮流光效果 */
.btn-search::after,
.btn-search-main::after,
.btn-refresh::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-search:hover::after,
.btn-search-main:hover::after,
.btn-refresh:hover::after {
    left: 100%;
}

.btn-search:hover,
.btn-search-main:hover,
.btn-refresh:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(121, 40, 202, 0.45), inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-search:active,
.btn-search-main:active,
.btn-refresh:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(121, 40, 202, 0.3);
}

.btn-refresh {
    padding: 10px 24px;
    font-size: 14px;
}

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

.tab {
    position: relative;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
}

.tab::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.4s;
}

.tab:hover::after { left: 100%; }

.tab.active,
.tab:hover {
    background: linear-gradient(135deg, #00d2ff, #7928ca);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.25);
    transform: translateY(-2px);
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
    justify-content: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

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

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

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

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

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

.results::-webkit-scrollbar { width: 6px; }
.results::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: 3px; }
.results::-webkit-scrollbar-thumb { background: rgba(0, 210, 255, 0.3); border-radius: 3px; }
.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;
}

/* 列表页紧凑化 */
.list-card h2 {
    display: none;
}

.list-card {
    padding: 15px 35px 35px 35px;
}

.list-controls {
    display: none;
}

.pagination {
    display: none;
}

/* 物品网格 - 改为单列列表 */
.items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 0;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 5px;
}

.items-grid::-webkit-scrollbar { width: 6px; }
.items-grid::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: 3px; }
.items-grid::-webkit-scrollbar-thumb { background: rgba(0, 210, 255, 0.3); border-radius: 3px; }
.items-grid::-webkit-scrollbar-thumb:hover { background: rgba(0, 210, 255, 0.5); }

.item-card {
    background: rgba(25, 30, 55, 0.7);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    height: auto !important;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    position: relative;
}

.item-card:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(0, 210, 255, 0.15),
                inset 0 0 15px rgba(0, 210, 255, 0.05);
    border-color: rgba(0, 210, 255, 0.4);
    background: rgba(30, 35, 65, 0.8);
}

/* 鼠标移动光晕效果 */
.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.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    border-radius: 16px;
}

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

.item-card-img-wrapper {
    width: 80px;
    min-width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px;
    box-sizing: border-box;
    transition: background 0.3s;
}

.item-card:hover .item-card-img-wrapper {
    background: rgba(0, 0, 0, 0.35);
}

.item-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.item-card:hover .item-card-image {
    transform: scale(1.1);
    filter: brightness(1.1) drop-shadow(0 0 8px rgba(0, 210, 255, 0.4));
}

.item-card-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    position: relative;
    min-width: 0;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 15px;
}

.item-card h3 {
    color: #fff;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.item-card .item-id {
    color: #ffd700 !important;
    font-size: 12px !important;
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
    font-weight: 600 !important;
    opacity: 0.9 !important;
    white-space: nowrap;
    margin: 0 !important;
}

.item-card p {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-align: left !important;
    padding-bottom: 0 !important;
    width: 100% !important;
}

.item-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(0, 210, 255, 0.12);
    color: #00d2ff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(0, 210, 255, 0.2);
    position: absolute;
    bottom: 16px;
    right: 16px;
    margin: 0;
    transition: all 0.3s;
}

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

/* 分类网格 */
.types-card h2 {
    display: none;
}

.types-card {
    padding: 15px 35px 35px 35px;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 15px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 5px;
}

.types-grid::-webkit-scrollbar { width: 6px; }
.types-grid::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: 3px; }
.types-grid::-webkit-scrollbar-thumb { background: rgba(0, 210, 255, 0.3); border-radius: 3px; }
.types-grid::-webkit-scrollbar-thumb:hover { background: rgba(0, 210, 255, 0.5); }

.type-card {
    background: rgba(25, 30, 55, 0.6);
    color: #fff;
    padding: 20px 15px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.2);
    border-color: rgba(0, 210, 255, 0.3);
    background: rgba(30, 35, 65, 0.7);
}

.type-card .type-name {
    font-size: 13px;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.type-card .type-count {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(90deg, #00d2ff, #7928ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* 分页 */
.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: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
}

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

.page-btn {
    position: relative;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    overflow: hidden;
    min-width: 40px;
}

.page-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.4s;
}

.page-btn:hover::after { left: 100%; }

.page-btn.active,
.page-btn:hover {
    background: linear-gradient(135deg, #00d2ff, #7928ca);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.25);
    transform: translateY(-2px);
}

.page-btn:active {
    transform: translateY(0);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 模态框 - 毛玻璃 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: rgba(20, 25, 45, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 45px;
    border-radius: 24px;
    max-width: 750px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
}

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

.close {
    position: absolute;
    right: 30px;
    top: 24px;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-item h3 {
    background: linear-gradient(90deg, #00d2ff, #7928ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    font-size: 26px;
    font-weight: 700;
}

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

.modal-item-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.modal-item-value {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
}

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

.loading::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(0, 210, 255, 0.2);
    border-top-color: #00d2ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

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

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

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

/* 响应式 */
@media (max-width: 768px) {
    .header { padding: 0 20px; height: 56px; }
    .logo { font-size: 18px; }
    .nav { gap: 12px; }
    .nav-item { font-size: 13px; padding: 6px 12px; }
    .main-content { padding: 75px 16px 20px; }
    .welcome-card, .search-card, .list-card, .types-card { padding: 20px 16px; }
    .list-card { padding: 15px 16px 25px 16px; }
    .items-grid { max-height: calc(100vh - 140px); }
    .welcome-card { padding: 15px 16px 25px 16px; }
    .stats { gap: 20px; flex-direction: column; margin-bottom: 25px; }
    .stat-item { padding: 25px 30px; }
    .stat-number { font-size: 42px; }
    .search-card h2 { font-size: 16px; margin-bottom: 8px; }
    .search-tabs { gap: 8px; margin-bottom: 15px; }
    .tab { padding: 7px 16px; font-size: 12px; }
    .search-box { flex-direction: column; gap: 10px; }
    .type-select { flex: 1; }
    .search-input, .type-select { padding: 10px 14px; font-size: 13px; }
    .btn-search-main { width: 100%; padding: 10px; }
    .types-grid { grid-template-columns: repeat(2, 1fr); }
    .type-card { min-height: 80px; padding: 15px 10px; }
    .type-card .type-name { font-size: 12px; }
    .type-card .type-count { font-size: 20px; }
    .item-card { flex-direction: column; height: auto !important; }
    .item-card-img-wrapper { width: 100%; height: 100px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .item-tag { bottom: 12px; right: 12px; }
    .modal-content { margin: 10% 16px; padding: 30px 20px; }

    /* 移动端物品卡片字体优化 */
    .item-card h3 {
        font-size: 15px !important;
    }
    .item-card .item-id {
        font-size: 11px !important;
    }
    .item-card p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
    
    /* 移动端布局调整：内容上移，留出底部空间给标签 */
    .item-card-body {
        padding: 10px 15px 40px 15px !important;
    }
    
    /* 移动端滚动条优化：更细、更隐蔽 */
    .items-grid::-webkit-scrollbar,
    .results::-webkit-scrollbar {
        width: 3px !important;
    }
    .items-grid::-webkit-scrollbar-track,
    .results::-webkit-scrollbar-track {
        background: transparent !important;
    }
    .items-grid::-webkit-scrollbar-thumb,
    .results::-webkit-scrollbar-thumb {
        background: rgba(0, 210, 255, 0.2) !important;
        border-radius: 3px !important;
    }
}
