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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 50%, #16a085 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    max-width: 900px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: white;
    font-size: 3em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.game-info {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    gap: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.label {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
    margin-bottom: 5px;
}

.value {
    font-size: 1.5em;
    color: #27ae60;
    font-weight: bold;
}

#gameCanvas {
    display: block;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    cursor: crosshair;
}

.start-screen,
.game-over,
.level-complete {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 500px;
    width: 90%;
    z-index: 1000;
}

.start-screen h2,
.game-over h2,
.level-complete h2 {
    color: #27ae60;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.instructions {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    line-height: 1.8;
}

.instructions p {
    margin-bottom: 10px;
    color: #333;
}

.instructions strong {
    color: #27ae60;
}

.btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(46, 204, 113, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.final-score,
.final-level,
.level-score {
    font-size: 1.3em;
    color: #555;
    margin: 15px 0;
}

.final-score span,
.final-level span,
.level-score span {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2em;
}

.game-over p,
.level-complete p {
    color: #666;
    margin: 10px 0;
}

/* Touch Controls */
.touch-controls {
    display: none; /* Hidden by default, shown on touch devices */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.control-btn {
    width: 70px;
    height: 70px;
    font-size: 2em;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.4);
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(46, 204, 113, 0.4);
}

.control-btn:hover {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

/* Responsive design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .tagline {
        font-size: 1em;
    }
    
    .game-info {
        padding: 10px;
    }
    
    .info-item {
        min-width: 80px;
    }
    
    .value {
        font-size: 1.2em;
    }
    
    #gameCanvas {
        max-width: 100%;
        height: auto;
    }
    
    .start-screen,
    .game-over,
    .level-complete {
        padding: 30px 20px;
    }
    
    .start-screen h2,
    .game-over h2,
    .level-complete h2 {
        font-size: 2em;
    }
}
