@font-face {
    font-family: 'FZLanTH';
    src: url('https://nie.res.netease.com/comm/js/nie/ref/fonts/fzlth.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b35;
    --primary-dark: #e55527;
    --secondary: #4ecdc4;
    --bg-dark: #0a0e27;
    --bg-card: #1a1f3a;
    --bg-input: #262b4a;
    --text-primary: #ffffff;
    --text-secondary: #a0a8c8;
    --border: #2a3050;
    --shadow: rgba(0, 0, 0, 0.3);
    --success: #4ade80;
    --error: #ef4444;
}

body {
    font-family: 'FZLanTH', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: #8FA0C6;
    min-height: 100vh;
    color: var(--text-primary);
}

.container {
    padding: 0 50px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* .card 样式已移除 */

.form-group {
    margin-bottom: 24px;
}

/* 移除宽度限制，使用全宽 */

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn .loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .loader {
    display: block;
}

/* Result styles removed */

.info-card {
    border-radius: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
}

.player-details {
    flex: 1;
    background: #1D253A;
    padding: 16px;
    border-radius: 12px;
}

.player-stats-summary {
    display: flex;
    gap: 30px;
    margin-top: 12px;
    background: transparent;
    border: none;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
}

/* info-box 和 status-box 样式已移除 */

#playerAvatar {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover !important;
    display: block !important;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 数据可视化样式 */
.stats-overview,
.matches-list-section,
.hero-stats-section,
.map-stats-section {
    background: rgba(78, 205, 196, 0.05);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.stats-overview h3,
.matches-list-section h3,
.hero-stats-section h3,
.map-stats-section h3 {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.stat-item {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.season-matches {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 107, 53, 0.05));
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.season-matches .stat-value {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(255, 182, 193, 0.8);
}

.season-matches .stat-label {
    color: var(--accent);
    font-weight: 600;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.list-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.list-controls select {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.matches-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.match-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.match-item:hover {
    background: rgba(255, 107, 53, 0.1);
    transform: translateX(4px);
}

.match-item:last-child {
    border-bottom: none;
}

.match-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.match-hero {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.match-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: 12px;
    align-items: center;
}

.match-basic {
    display: flex;
    flex-direction: column;
}

.match-hero-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.match-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.match-map {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.match-score {
    font-weight: 600;
    color: var(--text-primary);
}

.match-kda {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.match-result {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.match-result.win {
    background: rgba(74, 222, 128, 0.2);
    color: var(--success);
}

.match-result.lose {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.hero-stats-grid,
.map-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.hero-stat-item,
.map-stat-item {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-stat-icon,
.map-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.hero-stat-info,
.map-stat-info {
    flex: 1;
}

.hero-stat-name,
.map-stat-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.hero-stat-details,
.map-stat-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.win-rate-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.win-rate-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--error), var(--success));
    transition: width 0.3s ease;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

/* 玩家筛选功能样式 */
.player-filter-section {
    background: rgba(78, 205, 196, 0.05);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.player-filter-section h3 {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.player-filter-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.player-filter-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.player-filter-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.1);
}

.player-filter-select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.player-filter-select:focus {
    outline: none;
    border-color: var(--secondary);
}

.player-filter-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--secondary), #3ba99c);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-filter-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.player-filter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.frequent-players-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.frequent-player-item {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.frequent-player-item:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: var(--secondary);
    transform: translateX(2px);
}

.frequent-player-item.selected {
    background: rgba(78, 205, 196, 0.2);
    border-color: var(--secondary);
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.3);
}

.frequent-player-item.teammate {
    border-left: 3px solid var(--success);
}

.frequent-player-item.enemy {
    border-left: 3px solid var(--error);
}

.frequent-player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.frequent-player-info {
    flex: 1;
}

.frequent-player-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.frequent-player-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.filter-matches-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.filter-matches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.filter-matches-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.filter-matches-count {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-matches-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.filter-match-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-match-item:hover {
    background: rgba(255, 107, 53, 0.05);
}

.filter-match-item:last-child {
    border-bottom: none;
}

.filter-match-hero {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.filter-match-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.filter-match-basic {
    color: var(--text-primary);
}

.filter-match-result {
    font-weight: 600;
}

.filter-match-result.win {
    color: var(--success);
}

.filter-match-result.lose {
    color: var(--error);
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
}

.modal-body {
    padding: 28px;
}

.match-detail-section {
    margin-bottom: 24px;
}

.match-detail-section h3 {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.match-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    background: var(--bg-input);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.detail-value {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.detail-value.win {
    color: var(--success);
}

.detail-value.lose {
    color: var(--error);
}

.players-section {
    margin-top: 24px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.player-card {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-card.teammate {
    border: 1px solid rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.05);
}

.player-card.enemy {
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.player-hero {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.player-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.loading-detail {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.error-detail {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 16px;
    color: var(--error);
    text-align: center;
}

@media (max-width: 640px) {
    .header h1 {
        font-size: 2rem;
    }

    /* 响应式 .card 样式已移除 */

    body {
        padding: 20px 16px;
    }
}

/* 标签页样式 */
.tab-navigation {
    display: flex;
    background: #1D253A;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'FZLanTH', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.tab-btn.active {
    background: #F06314;
    color: white;
    border-bottom: 2px solid var(--primary);
}

.tab-icon {
    font-size: 16px;
}

.tab-text {
    font-size: 14px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 数据页面样式 */
.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: white;
}

/* 历史页面样式 */
.history-item {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.5fr 1fr;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    align-items: center;
    font-size: 12px;
    color: white;
}

.history-item:nth-child(even) {
    background: rgba(255, 255, 255, 0.08);
}

.history-result.win {
    color: #4ade80;
    font-weight: bold;
}

.history-result.lose {
    color: #ef4444;
    font-weight: bold;
}

.history-hero {
    font-weight: 500;
}

.history-map {
    color: rgba(255, 255, 255, 0.8);
}

.history-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.history-kda {
    color: rgba(255, 255, 255, 0.9);
    font-family: monospace;
}