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

body {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    color: #1b5e20;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    max-width: 800px;
    width: 100%;
    padding: 20px;
}

#game-info {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 20px 20px 0 0;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 -2px 20px rgba(46, 125, 50, 0.1);
}

.info-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.label {
    color: #66bb6a;
    font-weight: 500;
}

#gameCanvas {
    display: block;
    width: 100%;
    max-width: 800px;
    height: 600px;
    background: linear-gradient(to bottom, #ffffff, #f1f8f4);
    border: none;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.15);
}

#game-over, #start-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px;
    border: 1px solid rgba(102, 187, 106, 0.3);
    border-radius: 24px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.2), 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

#start-screen {
    padding: 50px 60px;
    max-width: 500px;
}

#start-screen h1 {
    font-size: 56px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 30px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.controls-info {
    margin: 30px 0;
    font-size: 15px;
    line-height: 1.6;
}

.controls-info h3 {
    color: #4caf50;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
}

.controls-info p {
    margin: 8px 0;
    color: #388e3c;
    font-weight: 400;
}

#game-over h2 {
    font-size: 42px;
    font-weight: 700;
    color: #4caf50;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

#game-over p {
    font-size: 24px;
    margin-bottom: 30px;
    color: #2e7d32;
    font-weight: 500;
}

button {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    color: #fff;
    border: none;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    letter-spacing: 0.5px;
}

button:hover {
    background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.hidden {
    display: none !important;
}

/* Mobile Controls */
#mobile-controls {
    display: none;
    justify-content: space-between;
    align-items: stretch;
    margin-top: 20px;
    gap: 10px;
}

.touch-area {
    flex: 1 1 0;
    min-width: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 187, 106, 0.3);
    border-radius: 50px;
    padding: 30px 20px;
    font-size: 36px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #2e7d32;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
    font-weight: 600;
}

.touch-area:active {
    background: rgba(102, 187, 106, 0.4);
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

#touch-left, #touch-right {
    flex: 1 1 0;
}

#touch-shoot {
    flex: 1.5 1 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #game-container {
        padding: 10px;
    }

    #gameCanvas {
        height: 400px;
    }

    #game-info {
        font-size: 14px;
        padding: 10px;
    }

    #start-screen h1 {
        font-size: 32px;
    }

    #game-over h2 {
        font-size: 28px;
    }

    button {
        padding: 12px 30px;
        font-size: 16px;
    }

    .controls-info {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #gameCanvas {
        height: 300px;
    }

    #game-info {
        font-size: 12px;
        padding: 8px;
    }

    #start-screen h1 {
        font-size: 24px;
    }

    #game-over h2 {
        font-size: 20px;
    }

    #game-over p {
        font-size: 16px;
    }

    button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Touch device detection */
@media (hover: none) and (pointer: coarse) {
    #mobile-controls {
        display: flex;
    }
}
