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

body {
    background: #0a1a2e;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0d2b4e, #041220);
    cursor: crosshair;
}

#ui-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    pointer-events: none;
    z-index: 10;
}

#hud {
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    width: fit-content;
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: auto;
}

.hud-item {
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0,150,255,0.5);
}

.btn {
    pointer-events: auto;
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,119,182,0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,119,182,0.6);
}

.toggle-btn {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(3px);
    width: fit-content;
    margin-top: 10px;
}

.toggle-btn.active {
    background: rgba(0, 200, 100, 0.4);
    border-color: #00ff88;
}

#upgrade-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
}

#leaderboard-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    pointer-events: auto;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #0a1a2e, #1a3a5e);
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

th {
    color: #00b4d8;
}

/* 管理后台样式 */
.login-form, .admin-panel {
    max-width: 600px;
    margin: 100px auto;
    background: rgba(0,0,0,0.8);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.login-form input, .admin-form input, .admin-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 10px;
}

.login-form button, .admin-form button {
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
}

.admin-panel pre {
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-top: 20px;
}

@media (max-width: 768px) {
    #hud { font-size: 0.8rem; padding: 8px 12px; }
    .hud-item { font-size: 0.9rem; }
    .btn { font-size: 0.8rem; padding: 6px 12px; }
}