body {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 10px;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

#gameContainer {
    border: 2px solid #333;
    width: 95vw;
    height: 80vh;
    overflow: hidden;
    background: white;
    position: relative;
}

.controls {
    background: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 95vw;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 95vw;
}

.input-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

#urlInput {
    flex: 1;
    min-width: 150px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
}

button {
    background: #ff5722;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    white-space: nowrap;
}

button:hover {
    background: #f4511e;
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

h1 {
    color: #ff5722;
    font-size: 2em;
    margin: 10px 0;
}

#stats {
    font-size: 1.2em;
    margin: 5px 0;
    font-weight: bold;
}

#stats span {
    margin: 0 10px;
}

#mobileControls {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
}

.control-zone {
    position: absolute;
    width: 33.33%;
    height: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.zone-left {
    left: 0;
    bottom: 25%;
    height: 50%;
}

.zone-right {
    right: 0;
    bottom: 25%;
    height: 50%;
}

.zone-jump {
    left: 33.33%;
    right: 33.33%;
    top: 25%;
}

.zone-down {
    left: 33.33%;
    right: 33.33%;
    bottom: 0;
}

.zone-attack {
    left: 33.33%;
    right: 33.33%;
    bottom: 25%;
}

.control-btn {
    width: 120px;
    height: 120px;
    font-size: 48px;
    background: rgba(255, 87, 34, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#downBtn {
    font-size: 40px;
}

.control-btn:active {
    background: rgba(255, 87, 34, 0.5);
}

.level-complete {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 24px;
    z-index: 1001;
    text-align: center;
}

.level-complete button {
    margin-top: 15px;
    background: #4CAF50;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    #gameContainer {
        border-color: #555;
        background: #2d2d2d;
    }

    .controls {
        background: #2d2d2d;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .input-group {
        background: #2d2d2d;
        border-color: #444;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    #urlInput {
        background: #333;
        border-color: #444;
        color: #e0e0e0;
    }

    button {
        background: #ff5722;
    }

    button:hover {
        background: #f4511e;
    }

    button:disabled {
        background: #555;
    }

    h1 {
        color: #ff7a50;
    }

    .control-btn {
        background: rgba(255, 87, 34, 0.4);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .control-btn:active {
        background: rgba(255, 87, 34, 0.6);
    }

    .level-complete {
        background: rgba(0, 0, 0, 0.9);
    }
}

@media (max-width: 768px) {
    .control-btn {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .control-btn {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
}