* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 辅助功能：隐藏视觉但保留屏幕阅读器可访问 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: 'Beaufort', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #0d1b2a 100%);
    min-height: 100vh;
    color: #f0e6d2;
    padding: 20px;
    position: relative;
}

/* 焦点可见性 */
*:focus {
    outline: 2px solid #c8aa6e;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #c8aa6e;
    outline-offset: 2px;
}

/* 跳过导航链接 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #c8aa6e;
    color: #091428;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 35px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(26, 26, 46, 0.85) 100%);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(200, 170, 110, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #c8aa6e, transparent);
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #c8aa6e 0%, #f0e6d2 50%, #c8aa6e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(200, 170, 110, 0.3);
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.subtitle {
    color: #a09b8c;
    font-size: 1.15em;
    font-weight: 400;
    letter-spacing: 1px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(26, 26, 46, 0.85) 100%);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(200, 170, 110, 0.25);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8aa6e, transparent);
    opacity: 0.5;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(200, 170, 110, 0.2);
    border-color: rgba(200, 170, 110, 0.5);
}

.stat-card h3 {
    color: #a09b8c;
    font-size: 0.95em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-value {
    font-size: 2.6em;
    font-weight: 900;
    background: linear-gradient(135deg, #c8aa6e 0%, #f0e6d2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

input[type="text"], select {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    border: 2px solid rgba(200, 170, 110, 0.3);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(26, 26, 46, 0.85) 100%);
    color: #f0e6d2;
    font-size: 1em;
    transition: all 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #c8aa6e;
    box-shadow: 0 0 20px rgba(200, 170, 110, 0.3);
}

input[type="text"]::placeholder {
    color: #a09b8c;
}

select {
    cursor: pointer;
    min-width: 150px;
}

select option {
    background: #0f172a;
    color: #f0e6d2;
    padding: 10px;
}

.refresh-btn, .tab-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #c8aa6e 0%, #e8d5a8 50%, #c8aa6e 100%);
    color: #091428;
    border: 2px solid #a89f91;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.refresh-btn:hover, .tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #d9b878 0%, #f0e6d2 50%, #d9b878 100%);
    border-color: #c8aa6e;
}

.refresh-btn:active, .tab-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.hero-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(26, 26, 46, 0.9) 100%);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(200, 170, 110, 0.25);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    position: relative;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #c8aa6e, transparent);
    opacity: 0.5;
    z-index: 3;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.hero-card:hover::after {
    opacity: 1;
}

.hero-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(200, 170, 110, 0.15);
    border-color: rgba(200, 170, 110, 0.5);
}

.hero-avatar {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-bottom: 3px solid #c8aa6e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(200, 170, 110, 0.15) 0%, 
        transparent 50%,
        rgba(15, 23, 42, 0.4) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hero-card:hover .hero-avatar img {
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)) brightness(1.1);
}

.hero-header {
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
    margin-top: -8px;
    position: relative;
    z-index: 2;
}

.hero-name {
    font-size: 1.4em;
    font-weight: 800;
    background: linear-gradient(135deg, #c8aa6e 0%, #f0e6d2 50%, #c8aa6e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(200, 170, 110, 0.3);
}

.hero-tier {
    font-size: 1.1em;
    font-weight: 900;
    padding: 6px 18px;
    border-radius: 5px;
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.2) 0%, rgba(200, 170, 110, 0.1) 100%);
    border: 2px solid #c8aa6e;
    color: #c8aa6e;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(200, 170, 110, 0.2);
    transition: all 0.3s;
}

.hero-card:hover .hero-tier {
    background: linear-gradient(135deg, #c8aa6e 0%, #e8d5a8 100%);
    color: #091428;
    box-shadow: 0 4px 15px rgba(200, 170, 110, 0.4);
    transform: scale(1.05);
}

.hero-body {
    padding: 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(26, 26, 46, 0.85) 100%);
    position: relative;
    z-index: 2;
}

.hero-combo {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(200, 170, 110, 0.2);
}

.hero-combo h4 {
    color: #c8aa6e;
    font-size: 0.9em;
    margin: 12px 0 8px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-combo h4:first-child {
    margin-top: 0;
}

.hero-combo .primary-rune {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-combo .primary-rune-name {
    font-size: 1.05em;
    font-weight: 700;
    color: #f0e6d2;
}

.hero-combo .recommended-augments,
.hero-combo .core-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.hero-combo .augment-tag,
.hero-combo .item-tag {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.2) 0%, rgba(200, 170, 110, 0.1) 100%);
    color: #c8aa6e;
    border: 1px solid rgba(200, 170, 110, 0.3);
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-combo .augment-tag:hover,
.hero-combo .item-tag:hover {
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.35) 0%, rgba(200, 170, 110, 0.25) 100%);
    border-color: rgba(200, 170, 110, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-combo .playstyle {
    margin-top: 12px;
    color: #a09b8c;
    font-size: 0.9em;
    line-height: 1.5;
    font-weight: 400;
}

.hero-combo .playstyle strong {
    color: #c8aa6e;
}

.hero-title {
    color: #a09b8c;
    margin-bottom: 15px;
    font-size: 0.95em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.5) 0%, rgba(26, 26, 46, 0.4) 100%);
    border-radius: 6px;
    border: 1px solid rgba(200, 170, 110, 0.15);
}

.stat-label {
    color: #a09b8c;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-weight: 700;
    font-size: 1.15em;
    color: #f0e6d2;
}

.stat-value.positive {
    color: #78c257;
    text-shadow: 0 0 10px rgba(120, 194, 87, 0.3);
}

.stat-value.negative {
    color: #e84057;
    text-shadow: 0 0 10px rgba(232, 64, 87, 0.3);
}

.loading, .no-result {
    text-align: center;
    padding: 60px;
    color: #a0a0a0;
    font-size: 1.2em;
}

/* 标签页导航 */
.tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(26, 26, 46, 0.9) 100%);
    padding: 8px;
    border-radius: 5px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(200, 170, 110, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.tab-btn {
    flex: 1;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 3px;
    color: #a09b8c;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

.tab-btn:hover {
    background: rgba(200, 170, 110, 0.1);
    color: #c8aa6e;
    border-color: rgba(200, 170, 110, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #c8aa6e 0%, #e8d5a8 100%);
    color: #091428;
    border-color: #a89f91;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 符文卡片样式 */
.rune-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.rune-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(26, 26, 46, 0.9) 100%);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(200, 170, 110, 0.25);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    position: relative;
}

.rune-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8aa6e, transparent);
    opacity: 0.4;
}

.rune-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(200, 170, 110, 0.15);
    border-color: rgba(200, 170, 110, 0.5);
}

.rune-header {
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.rune-name {
    font-size: 1.4em;
    font-weight: 800;
    color: #1a1a2e;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

.rune-tier {
    font-size: 1.1em;
    font-weight: 900;
    padding: 6px 18px;
    border-radius: 5px;
    border: 2px solid #c8aa6e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 符文等级颜色 */
.rune-card[data-tier="棱彩"] .rune-header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 25%, #4ECDC4 50%, #A855F7 75%, #FF6B6B 100%) !important;
    background-size: 300% 300%;
    animation: rainbow 3s ease infinite;
}

.rune-card[data-tier="棱彩"] .rune-tier {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 25%, #4ECDC4 50%, #A855F7 75%, #FF6B6B 100%);
    background-size: 300% 300%;
    animation: rainbow 3s ease infinite;
    color: #1a1a2e;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6), 0 0 20px rgba(255, 230, 109, 0.6), 0 0 20px rgba(78, 205, 196, 0.6);
}

@keyframes rainbow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.rune-card[data-tier="黄金"] .rune-header {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
}

.rune-card[data-tier="黄金"] .rune-tier {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a2e;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.rune-card[data-tier="白银"] .rune-header {
    background: linear-gradient(135deg, #C0C0C0 0%, #E8E8E8 100%) !important;
}

.rune-card[data-tier="白银"] .rune-tier {
    background: linear-gradient(135deg, #C0C0C0 0%, #E8E8E8 100%);
    color: #1a1a2e;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.rune-body {
    padding: 20px;
}

.rune-description {
    color: #a09b8c;
    margin-bottom: 15px;
    line-height: 1.6;
    font-weight: 400;
}

.rune-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .stats-overview {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
    }

    #searchInput, #sortSelect, .refresh-btn {
        width: 100%;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer样式 */
footer {
    margin-top: 40px;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid rgba(200, 170, 110, 0.2);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.5) 0%, rgba(26, 26, 46, 0.3) 100%);
    backdrop-filter: blur(5px);
}

footer p {
    color: #a09b8c;
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 8px;
}

footer p:last-child {
    margin-bottom: 0;
}

footer p strong {
    color: #c8aa6e;
}

/* SEO优化：改善页面加载性能 */
@media screen and (max-width: 767px) {
    .hero-avatar img {
        content-visibility: auto;
        contain-intrinsic-size: 180px 180px;
    }
}
