* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #8fcc3e 0%, #b6ff3e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #6b9f1a;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 3px;
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #6b9f1a 0%, #8fcc3e 100%);
    padding: 10px 5px;
    border-radius: 10px;
    color: white;
    font-size: 0.9em;
    font-weight: bold;
    flex-wrap: wrap;
    gap: 5px;
}

.score, .coins-collected, .timer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timer {
    color: #b6ff3e;
    font-size: 1.3em;
    text-shadow: 0 0 10px rgba(182, 255, 62, 0.8);
}

.game-board {
    width: 100%;
    height: 400px;
    min-height: 300px;
    background: linear-gradient(135deg, #b6ff3e 0%, #d4ff7a 100%);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    border: 3px solid #6b9f1a;
    margin-bottom: 15px;
    touch-action: none;
}

.player {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6b9f1a 0%, #8fcc3e 100%);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #b6ff3e;
    box-shadow: 0 4px 15px rgba(182, 255, 62, 0.5);
    transition: transform 0.1s ease;
    z-index: 10;
}

.player::before {
    content: '👤';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
}

.coin {
    width: 50px;
    height: 50px;
    background-image: url('public/symbioticlogo-removebg-preview.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    position: absolute;
    border: none;
    box-shadow: 0 4px 15px rgba(182, 255, 62, 0.5);
    animation: coinPulse 1s ease-in-out infinite;
    z-index: 5;
    filter: drop-shadow(0 2px 8px rgba(107, 159, 26, 0.4));
}

@keyframes coinPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.coin.collected {
    animation: collectCoin 0.3s ease-out forwards;
}

@keyframes collectCoin {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.controls {
    text-align: center;
}

.instructions {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.button-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

button {
    background: linear-gradient(135deg, #6b9f1a 0%, #b6ff3e 100%);
    color: #1a3d0a;
    border: none;
    padding: 10px 20px;
    font-size: 0.95em;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(182, 255, 62, 0.3);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(107, 159, 26, 0.95);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid #b6ff3e;
}

.game-over h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #b6ff3e;
    text-shadow: 0 0 15px rgba(182, 255, 62, 0.8);
}

.game-over p {
    font-size: 1.5em;
    margin: 10px 0;
}

/* Touch Controls */
.touch-controls {
    display: none;
    justify-content: center;
    margin-top: 15px;
    padding: 10px;
}

.dpad {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    align-items: center;
    justify-items: center;
}

.dpad-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    width: 100%;
}

.dpad-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6b9f1a 0%, #b6ff3e 100%);
    color: #1a3d0a;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(182, 255, 62, 0.3);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: transform 0.1s, opacity 0.1s;
}

.dpad-btn:active {
    transform: scale(0.9);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
        border-radius: 15px;
    }

    .header h1 {
        font-size: 1.8em;
        letter-spacing: 2px;
        margin-bottom: 10px;
    }

    .score-board {
        font-size: 0.8em;
        padding: 8px 5px;
    }

    .timer {
        font-size: 1.1em;
    }

    .game-board {
        height: 350px;
        min-height: 250px;
    }

    .player {
        width: 40px;
        height: 40px;
    }

    .player::before {
        font-size: 24px;
    }

    .coin {
        width: 40px;
        height: 40px;
    }

    .instructions {
        display: none;
    }

    .touch-controls {
        display: flex;
    }

    button {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .game-over {
        padding: 20px;
        max-width: 90%;
    }

    .game-over h2 {
        font-size: 1.8em;
    }

    .game-over p {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .game-container {
        padding: 8px;
    }

    .header h1 {
        font-size: 1.5em;
        letter-spacing: 1px;
    }

    .score-board {
        font-size: 0.7em;
        flex-direction: column;
        align-items: center;
    }

    .game-board {
        height: 300px;
        min-height: 250px;
    }

    .player {
        width: 35px;
        height: 35px;
    }

    .player::before {
        font-size: 20px;
    }

    .coin {
        width: 35px;
        height: 35px;
    }

    .dpad-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }

    button {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    .game-over {
        padding: 15px;
    }

    .game-over h2 {
        font-size: 1.5em;
    }

    .game-over p {
        font-size: 1em;
    }
}

@media (min-width: 769px) {
    .touch-controls {
        display: none !important;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .game-board {
        height: 250px;
        min-height: 200px;
    }

    .header h1 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }

    .score-board {
        font-size: 0.75em;
        padding: 6px 5px;
    }
}

