body {
    background: #111;
    color: #eee;
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.mobile-warning {
    display: none;
    background: rgba(255, 165, 0, 0.9);
    color: #000;
    padding: 15px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

@media (max-width: 768px) {
    .mobile-warning {
        display: block;
    }
}

h1 {
    margin-top: 20px;
    color: #0f0;
    text-shadow: 2px 2px 8px #0f0;
}

/* Message Box Styles */
.message-box {
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
    line-height: 1.6;
    font-size: 1.1em;
}

/* Game Container Layout */
.game-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 20px auto;
    max-width: 1400px;
}

/* Level Selection Styles */
.level-selection {
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 20px;
    width: 200px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.level-selection h2 {
    color: #0f0;
    margin: 0 0 15px 0;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.level-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.level-item {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-item.active {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #0f0;
    color: #0f0;
}

.level-item.locked {
    background: rgba(100, 100, 100, 0.2);
    color: #666;
    cursor: not-allowed;
}

/* Game Section Styles */
.game-section {
    flex-grow: 1;
}

.info {
    margin-bottom: 10px;
    font-size: 18px;
}

.timer {
    color: #0f0;
    font-weight: bold;
}

.score {
    color: #fff;
    font-weight: bold;
}

#playAgain {
    background: #0f0;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    transition: background-color 0.3s;
}

#playAgain:hover {
    background: #0c0;
}

canvas {
    background: linear-gradient(#000066 0%, #0000cc 40%, #000000 40%, #000000 100%);
    border: 2px solid #0f0;
    cursor: crosshair;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

/* Custom crosshair cursor */
canvas {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='12' fill='none' stroke='%230f0' stroke-width='2'/%3E%3Cline x1='16' y1='4' x2='16' y2='28' stroke='%230f0' stroke-width='2'/%3E%3Cline x1='4' y1='16' x2='28' y2='16' stroke='%230f0' stroke-width='2'/%3E%3C/svg%3E") 16 16, crosshair;
}

/* Leaderboard Styles */
.leaderboard {
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 20px;
    width: 250px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.leaderboard h2 {
    color: #0f0;
    margin: 0 0 15px 0;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.leaderboard-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 5px;
}

.platform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 4px;
    font-size: 16px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 50%;
    padding: 4px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.player-name {
    color: #fff;
    font-weight: bold;
}

.player-score {
    color: #0f0;
    font-weight: bold;
}

.score-date {
    color: #666;
    font-size: 0.8em;
    margin-left: 8px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 20, 0, 0.95);
    padding: 30px;
    border: 2px solid #0f0;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    animation: modalAppear 0.3s ease-out;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: none;
    border: 2px solid #0f0;
    color: #0f0;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: rgba(0, 255, 0, 0.2);
    transform: rotate(90deg);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-content h2 {
    color: #0f0;
    margin: 0 0 20px 0;
    font-size: 2em;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.modal-content p {
    color: #fff;
    margin: 10px 0;
    font-size: 1.2em;
}

.final-score {
    font-size: 4em;
    color: #0f0;
    margin: 20px 0;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
    font-weight: bold;
}

.name-input {
    margin: 20px 0;
}

.name-input input {
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #0f0;
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    width: 80%;
    font-size: 1.1em;
    text-align: center;
}

.name-input input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.modal-content button {
    background: #0f0;
    color: #000;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.modal-content button:hover {
    background: #0c0;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* Achievement Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    color: #000;
}

.badge svg {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.badge-novice {
    background: linear-gradient(45deg, #cd7f32, #daa520);
}

.badge-expert {
    background: linear-gradient(45deg, #c0c0c0, #e8e8e8);
}

.badge-master {
    background: linear-gradient(45deg, #ffd700, #ffdf00);
}

.badge-legend {
    background: linear-gradient(45deg, #4caf50, #45a049);
}

/* Footer Styles */
.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 2px solid #0f0;
    background: rgba(0, 20, 0, 0.8);
}

.footer .brand {
    font-size: 24px;
    font-weight: bold;
    color: #0f0;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    margin-bottom: 10px;
}

.footer .social-links {
    margin-top: 10px;
}

.footer .social-links a {
    color: #0f0;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border: 1px solid #0f0;
    border-radius: 5px;
    margin: 0 5px;
}

.footer .social-links a:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
    transform: translateY(-2px);
}

.open-source-header {
    background: rgba(0, 20, 0, 0.8);
    border-bottom: 2px solid #0f0;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.open-source-header a {
    color: #0088ff;
    text-decoration: underline;
    cursor: pointer;
}

.source-code-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.code-sections {
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.code-sections pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
}