@font-face {
    font-family: 'Zpix';
    src: url('./font/zpix.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Press Start 2P', 'ZCOOL QingKe HuangYou', 'Microsoft YaHei', sans-serif;
    background: #1a1a1a;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.1) 2px, rgba(0,0,0,.1) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,.1) 2px, rgba(0,0,0,.1) 4px);
    color: #ffd700;
    min-height: 100vh;
    padding: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

header {
    padding: 48px 0 32px;
    margin-bottom: 24px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    color: #ffd700;
    margin-bottom: 16px;
    text-shadow: 
        4px 4px 0px #000,
        0 0 20px rgba(255, 215, 0, 0.4);
    letter-spacing: 2px;
}

@keyframes glowPulse {
    0%, 100% { 
        text-shadow: 
            4px 4px 0px #000,
            0 0 20px rgba(255, 215, 0, 0.5),
            0 0 40px rgba(255, 215, 0, 0.3);
    }
    50% { 
        text-shadow: 
            4px 4px 0px #000,
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.5),
            0 0 80px rgba(255, 215, 0, 0.3);
    }
}

.subtitle {
    font-size: 0.5em;
    color: #ffed4e;
    line-height: 1.8;
    text-shadow: 2px 2px 0px #000;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    background: #2a2a2a;
    border: 4px solid #000;
    box-shadow: 
        0 0 0 4px #ffd700,
        8px 8px 0 0 #000;
}

.player-row {
    display: grid;
    grid-template-columns: 120px 64px 1fr;
    align-items: center;
    background: #2a2a2a;
    padding: 16px 20px;
    gap: 16px;
    border-bottom: 4px solid #000;
    transition: all 0.1s ease;
    position: relative;
}

.player-row:last-child {
    border-bottom: none;
}

.player-row:hover {
    background: #ffd700;
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 0 #000;
}

.player-row:hover .player-name {
    color: #000;
    text-shadow: none;
}

.player-row:hover .tier {
    border-color: #000;
}

.tier {
    font-size: 0.6em;
    font-weight: bold;
    padding: 8px 12px;
    text-align: center;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 0 #000;
    position: relative;
}

.tier-s {
    background: #ff6b6b;
    color: #fff;
}

.tier-s- {
    background: #ffaa00;
    color: #000;
}



.tier-a {
    background: #ffd700;
    color: #000;
}

.tier-a\+ {
    background: #ffed4e;
    color: #000;
}

.tier-a- {
    background: #e6be00;
    color: #000;
}

.tier-b {
    background: #4ecdc4;
    color: #000;
}

.tier-c {
    background: #4d96ff;
    color: #fff;
}

.tier-d {
    background: #666;
    color: #fff;
}

.player-avatar {
    width: 64px;
    height: 64px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 0 #ffd700;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.player-name {
    font-size: 0.75em;
    color: #ffd700;
    letter-spacing: 1px;
    line-height: 1.6;
    text-shadow: 1px 1px 0px #000;
    font-family: 'Press Start 2P', 'ZCOOL QingKe HuangYou', 'Microsoft YaHei', sans-serif;
}

.player-name:lang(zh) {
    font-size: 1em;
    letter-spacing: 3px;
    font-weight: normal;
    font-family: 'Zpix', 'Microsoft YaHei', sans-serif;
}

/* 添加复古扫描线效果 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.05) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
}

/* Footer 样式 */
footer {
    margin-top: 32px;
    padding: 24px 0;
}

.join-us {
    background: #2a2a2a;
    border: 4px solid #000;
    box-shadow: 
        0 0 0 4px #ffd700,
        8px 8px 0 0 #000;
    padding: 24px;
    text-align: center;
}

.join-title {
    font-size: 0.9em;
    color: #ffd700;
    margin-bottom: 12px;
    text-shadow: 2px 2px 0px #000;
    letter-spacing: 3px;
}

.join-desc {
    font-size: 0.5em;
    color: #ffed4e;
    margin-bottom: 20px;
    text-shadow: 1px 1px 0px #000;
    font-family: 'Zpix', 'Microsoft YaHei', sans-serif;
    letter-spacing: 2px;
}

.qq-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffd700;
    color: #000;
    padding: 12px 24px;
    border: 3px solid #000;
    box-shadow: 4px 4px 0 0 #000;
    text-decoration: none;
    font-size: 0.6em;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.1s ease;
    cursor: pointer;
    font-family: 'Press Start 2P', monospace;
}

.qq-button:hover {
    background: #ffed4e;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 #000;
}

.qq-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 #000;
}

.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: #000;
    color: #ffd700;
    padding: 16px 32px;
    border: 3px solid #ffd700;
    font-size: 0.7em;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
}

.copy-toast.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 16px 12px;
    }

    header {
        padding: 24px 0 20px;
    }

    header h1 {
        font-size: 1.4em;
        line-height: 1.4;
        text-shadow: 3px 3px 0px #000;
    }
    
    .subtitle {
        font-size: 0.45em;
        line-height: 2;
        margin-top: 8px;
    }
    
    .player-row {
        grid-template-columns: 90px 56px 1fr;
        padding: 14px 16px;
        gap: 12px;
    }
    
    .tier {
        font-size: 0.5em;
        padding: 6px 10px;
        letter-spacing: 1.5px;
        border: 2px solid #000;
        box-shadow: 2px 2px 0 0 #000;
    }
    
    .player-avatar {
        width: 56px;
        height: 56px;
        border: 2px solid #000;
        box-shadow: 2px 2px 0 0 #ffd700;
    }
    
    .player-name {
        font-size: 0.65em;
        line-height: 1.5;
    }
    
    .leaderboard {
        border: 3px solid #000;
        box-shadow: 
            0 0 0 3px #ffd700,
            6px 6px 0 0 #000;
    }
    
    footer {
        margin-top: 24px;
    }
    
    .join-us {
        border: 3px solid #000;
        box-shadow: 
            0 0 0 3px #ffd700,
            6px 6px 0 0 #000;
        padding: 20px;
    }
    
    .join-title {
        font-size: 0.75em;
    }
    
    .join-desc {
        font-size: 0.45em;
    }
    
    .qq-button {
        font-size: 0.55em;
        padding: 10px 20px;
    }
    
    body::before {
        background-size: 100% 3px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px 8px;
    }

    header {
        padding: 20px 0 16px;
    }

    header h1 {
        font-size: 1em;
        line-height: 1.5;
        text-shadow: 2px 2px 0px #000;
        letter-spacing: 1px;
    }
    
    .subtitle {
        font-size: 0.38em;
        line-height: 2.2;
        margin-top: 6px;
    }
    
    .player-row {
        grid-template-columns: 75px 48px 1fr;
        padding: 12px 12px;
        gap: 10px;
    }
    
    .tier {
        font-size: 0.42em;
        padding: 5px 8px;
        letter-spacing: 1px;
        border: 2px solid #000;
        box-shadow: 2px 2px 0 0 #000;
    }
    
    .player-avatar {
        width: 48px;
        height: 48px;
        border: 2px solid #000;
        box-shadow: 2px 2px 0 0 #ffd700;
    }
    
    .player-name {
        font-size: 0.55em;
        line-height: 1.6;
        letter-spacing: 0.5px;
    }
    
    .leaderboard {
        border: 2px solid #000;
        box-shadow: 
            0 0 0 2px #ffd700,
            4px 4px 0 0 #000;
    }
    
    footer {
        margin-top: 20px;
    }
    
    .join-us {
        border: 2px solid #000;
        box-shadow: 
            0 0 0 2px #ffd700,
            4px 4px 0 0 #000;
        padding: 16px;
    }
    
    .join-title {
        font-size: 0.65em;
        margin-bottom: 10px;
    }
    
    .join-desc {
        font-size: 0.4em;
        margin-bottom: 16px;
    }
    
    .qq-button {
        font-size: 0.48em;
        padding: 10px 16px;
        gap: 8px;
    }
    
    body::before {
        background-size: 100% 2px;
    }
}

@media (max-width: 360px) {
    header h1 {
        font-size: 0.85em;
        letter-spacing: 0.5px;
    }
    
    .subtitle {
        font-size: 0.32em;
    }
    
    .player-row {
        grid-template-columns: 65px 40px 1fr;
        padding: 10px 8px;
        gap: 8px;
    }
    
    .tier {
        font-size: 0.36em;
        padding: 4px 6px;
        letter-spacing: 0.5px;
    }
    
    .player-avatar {
        width: 40px;
        height: 40px;
    }
    
    .player-name {
        font-size: 0.48em;
        line-height: 1.7;
        letter-spacing: 0px;
    }
    
    .join-title {
        font-size: 0.55em;
    }
    
    .join-desc {
        font-size: 0.36em;
    }
    
    .qq-button {
        font-size: 0.42em;
        padding: 8px 12px;
    }
}
