/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --steam-dark-blue: #1b2838;
    --steam-blue: #2a475e;
    --steam-light-blue: #66c0f4;
    --steam-green: #90ba3c;
    --steam-orange: #ff6600;
    --steam-gray: #c7d5e0;
    --steam-light-gray: #e3e6e8;
    --steam-bg: #0e1419;
    --text-primary: #ffffff;
    --text-secondary: #c7d5e0;
    --text-muted: #8f98a0;
    --border-color: #3c4043;
    --card-bg: #1e2328;
    --hover-bg: #2a475e;
    --error-color: #ff4444;
    --success-color: #4caf50;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--steam-bg) 0%, var(--steam-dark-blue) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--steam-light-blue), var(--steam-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 搜索区域 */
.search-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input {
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--steam-dark-blue);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--steam-light-blue);
    box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.1);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, var(--steam-light-blue), var(--steam-green));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 192, 244, 0.3);
}

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

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.help-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 错误消息 */
.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: var(--error-color);
    text-align: center;
    font-weight: 500;
}

/* 用户信息卡片 */
.user-info {
    animation: fadeInUp 0.5s ease-out;
}

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

.user-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.user-avatar {
    position: relative;
    flex-shrink: 0;
}

.user-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 3px solid var(--steam-light-blue);
    box-shadow: 0 4px 20px rgba(102, 192, 244, 0.3);
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
}

.status-indicator.online {
    background: var(--success-color);
}

.status-indicator.offline {
    background: var(--text-muted);
}

.status-indicator.away {
    background: var(--steam-orange);
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.user-status {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--steam-blue);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.profile-btn:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 71, 94, 0.4);
}

/* 附加信息 */
.additional-info {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.info-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.game-stats {
    display: flex;
    gap: 40px;
}

.game-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--steam-light-blue);
    margin-bottom: 5px;
}

.stat-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* 页脚 */
.footer {
    margin-top: auto;
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Steam ID 转换信息样式 */
.steam-ids {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.steam-ids h3 {
    margin: 0 0 15px 0;
    color: #66c0f4;
    font-size: 1.1em;
}

.id-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.id-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.id-item label {
    font-size: 0.9em;
    color: #8f98a0;
    font-weight: 500;
}

.id-value {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c7d5e0;
    font-size: 0.9em;
    word-break: break-all;
}

/* Steam 等级和徽章样式 */
.steam-level-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.level-info, .badges-info {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.level-info h3, .badges-info h3 {
    margin: 0 0 15px 0;
    color: #66c0f4;
    font-size: 1.1em;
}

.level-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.level-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.level-text {
    font-size: 1.2em;
    color: #c7d5e0;
}

.badge-stats {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.badge-count {
    font-size: 1.8em;
    font-weight: bold;
    color: #66c0f4;
}

.badge-label {
    font-size: 0.9em;
    color: #8f98a0;
}

/* 最近游戏样式 */
.recent-games {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-games h3 {
    margin: 0 0 15px 0;
    color: #66c0f4;
    font-size: 1.1em;
}

.games-list {
    display: grid;
    gap: 12px;
}

.game-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.game-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #66c0f4;
}

.game-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.game-info {
    flex: 1;
}

.game-name {
    font-weight: 500;
    color: #c7d5e0;
    margin: 0 0 4px 0;
}

.game-playtime {
    font-size: 0.9em;
    color: #8f98a0;
    margin: 0;
}

.game-last-played {
    font-size: 0.8em;
    color: #66c0f4;
    white-space: nowrap;
}

/* 响应式设计更新 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .user-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .user-avatar {
        align-self: center;
    }
    
    .user-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .steam-level-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .id-grid {
        grid-template-columns: 1fr;
    }
    
    .badge-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .game-last-played {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .user-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .user-name {
        font-size: 1.5rem;
    }
}