html, body {
    font-family: Arial, sans-serif;
    background: #2c3e50;
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    padding: 10px;
}

#score {
    font-size: 1.5em;
    margin: 20px 0;
    background: #34495e;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
}

#gameCanvas {
    background: #ecf0f1;
    border: 4px solid #2c3e50;
    border-radius: 10px;
    margin: 10px auto;
    display: block;
    max-width: 90vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    touch-action: manipulation;
}

.controls {
    margin-top: 20px;
}

.controls button {
    padding: 15px 30px;
    margin: 0 5px;
    font-size: 1.2em;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.controls button:hover {
    background: #2980b9;
}

.footer {
    margin-top: 20px;
    font-size: 0.9em;
    color: #a5abaf;
}
.footer a {
    color: #a5abaf;
    text-decoration: underline;
}
.footer a:hover {
    text-decoration: underline;
}

/* Form Styling */
form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

input, button {
    padding: 8px;
    font-size: 16px;
}

button {
    cursor: pointer;
    background: #4CAF50;
    color: white;
    border: none;
}

/* Success Message */
.success {
    color: green;
    margin-top: 10px;
}

/* Error Message */
.error {
    color: red;
    margin-top: 10px;
}

/* Loading indicator */
.loading {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
    }
    
    input, button {
        font-size: 14px;
        padding: 6px;
    }
}