* {
    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;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin: 0;
}

main {
    padding: 30px;
}

.game-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 768px) {
    .game-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Canvas */
#gameCanvas {
    border: 3px solid #333;
    background: #1a1a1a;
    border-radius: 8px;
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Info Panel */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.score-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.score-container h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.score {
    font-size: 3em;
    font-weight: bold;
}

/* Controls */
.controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.controls h3 {
    margin-bottom: 15px;
    color: #333;
}

.controls p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.reset-btn {
    width: 100%;
    padding: 12px 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Instructions */
.instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.instructions h3 {
    margin-bottom: 15px;
    color: #333;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    color: #666;
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 0.95em;
}

.instructions li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.3em;
    color: #666;
    margin-bottom: 30px;
}

.modal-content span {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
}

.play-again-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.play-again-btn:active {
    transform: translateY(0);
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e9ecef;
}

footer p {
    margin: 0;
}
