* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    text-align: center;
}

header {
    margin-bottom: 20px;
}

h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 2.5em;
}

.score-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.score-box {
    background: linear-gradient(45deg, #667eea, #764ba2);
    padding: 15px 25px;
    border-radius: 10px;
    min-width: 120px;
}

.score-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.score-value {
    color: white;
    font-size: 1.8em;
    font-weight: bold;
}

.game-info {
    margin-bottom: 20px;
}

.game-info p {
    color: #666;
    margin-bottom: 10px;
    font-size: 1em;
}

.instruction {
    color: #999;
    font-size: 0.9em;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.start-btn, .try-again-btn, .fullscreen-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.start-btn:hover, .try-again-btn:hover, .fullscreen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.fullscreen-btn {
    background: linear-gradient(45deg, #27ae60, #229954);
}

.canvas-wrapper {
    position: relative;
    display: inline-block;
    margin: 20px 0;
}

#gameCanvas {
    border: 3px solid #333;
    border-radius: 10px;
    background: #f0f0f0;
    display: block;
    max-width: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    z-index: 1000;
}

.game-over.hidden {
    display: none;
}

.game-over-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.game-over-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
}

.game-over-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.ranking-list {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.rank-number {
    font-weight: bold;
    color: #667eea;
    min-width: 60px;
    font-size: 1.1em;
}

.rank-name {
    flex: 1;
    margin-left: 15px;
    font-weight: bold;
    color: #333;
}

.rank-size {
    color: #666;
    margin-right: 15px;
}

.rank-status {
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.controls-info {
    margin-top: 15px;
    color: #999;
    font-size: 0.9em;
}

.settings-panel {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-group label {
    font-weight: bold;
    color: #333;
    font-size: 0.9em;
}

.setting-group select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 0.9em;
    background: white;
    cursor: pointer;
    min-width: 120px;
}

.setting-group select:hover {
    border-color: #667eea;
}

.powerup {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }

    .score-container {
        gap: 10px;
    }

    .score-box {
        padding: 10px 15px;
        min-width: 100px;
    }

    .score-value {
        font-size: 1.4em;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }
}
