
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100"><rect fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1" x="0" y="0" width="100" height="100" /><path fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5" d="M0,0L100,100M100,0L0,100"/></svg>');
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.fixed-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
    background: rgba(10, 15, 40, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

header {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-out;
}

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

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    background: linear-gradient(to right, #ffd700, #ff8c00, #ff4500);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(to right, #ffd700, #ff4500);
    border-radius: 2px;
}

header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 20px auto 0;
    color: #e0e0ff;
    line-height: 1.6;
}

.search-section {
    background: rgba(10, 15, 40, 0.85);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.8s ease-out;
}

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

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 15px;
}

.search-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    background: rgba(30, 35, 70, 0.8);
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    background: rgba(40, 45, 90, 0.9);
}

.search-form button {
    padding: 14px 35px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff8c00, #ff4500);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

.search-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6);
}

.search-form button:active {
    transform: translateY(1px);
}

.result-section {
    display: none;
    background: rgba(10, 15, 40, 0.85);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.8s ease-out;
}

.player-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(20, 25, 60, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.player-info h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(30, 35, 70, 0.8);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #ff8c00, #ff4500);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #ffa500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stat-card .value {
    font-size: 2.2rem;
    font-weight: bold;
    background: linear-gradient(to right, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 更新图表容器样式 */
.charts-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.chart-box {
    background: rgba(30, 35, 70, 0.8);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 600px;
    height: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-box h3 {
    color: #ffd700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
}

/* 图表画布样式 */
.chart-box canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 auto;
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.challenge-card {
    background: rgba(40, 45, 80, 0.8);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border-left: 4px solid #ff8c00;
    position: relative;
    overflow: hidden;
}

.challenge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 69, 0, 0.3);
}

.challenge-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.challenge-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.challenge-stat {
    text-align: center;
    flex: 1;
}

.challenge-stat .label {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 5px;
}

.challenge-stat .value {
    font-size: 1.2rem;
    font-weight: bold;
}

.loading {
    display: none;
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ff8c00;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

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

.error {
    display: none;
    background: rgba(200, 50, 50, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    text-align: center;
    max-width: 600px;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.copy-btn {
    background: rgba(50, 50, 150, 0.5);
    border: none;
    color: #ccc;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    margin: 15px 10px;
    transition: all 0.3s;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background: rgba(70, 70, 200, 0.7);
    color: white;
    transform: translateY(-2px);
}

.highlight {
    color: #ff8c00;
    font-weight: bold;
}

.difficulty-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.difficulty-tag.low {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
}

.difficulty-tag.medium {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid #FFC107;
}

.difficulty-tag.high {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #F44336;
}

.difficulty-tag.extreme {
    background: rgba(156, 39, 176, 0.2);
    border: 1px solid #9C27B0;
}

.rating-badge {
    display: inline-block;
    min-width: 60px;
    padding: 3px 8px;
    background: rgba(255, 140, 0, 0.2);
    border-radius: 12px;
    border: 1px solid #ff8c00;
    font-weight: bold;
    text-align: center;
}

.formula-display {
    background: rgba(30, 40, 80, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.saved-ids {
    margin-top: 20px;
    padding: 15px;
    background: rgba(20, 25, 60, 0.7);
    border-radius: 10px;
}

.saved-id-btn {
    background: rgba(70, 70, 180, 0.5);
    border: none;
    color: #e0e0ff;
    padding: 8px 15px;
    border-radius: 20px;
    margin: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.saved-id-btn:hover {
    background: rgba(90, 90, 220, 0.7);
}

.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(30, 35, 70, 0.8);
    border-radius: 50px;
    padding: 8px 15px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s;
}

.lang-btn:hover {
    color: #ff8c00;
}

.lang-btn.active {
    background: rgba(255, 140, 0, 0.3);
    color: #ffd700;
}
