/* Car Dash - Game Styles */

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

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #1a1a1a;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

#game-container {
    width: 100%;
    height: calc(100vh - 50px);
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a;
    position: relative;
    flex-shrink: 0;
}

#gameCanvas {
    display: block;
    background-color: #f5f0e6;
    cursor: pointer;
    max-width: 100%;
    max-height: 100%;
}

/* Play Counter */
#play-counter {
    background-color: #1a1a1a;
    color: #f5f0e6;
    text-align: center;
    padding: 16px 20px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
}

#play-counter #play-count {
    font-weight: bold;
    font-size: 22px;
    color: #f5c542;
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}

/* Selection color */
::selection {
    background-color: #d64545;
    color: white;
}

/* Loading state */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f5f0e6;
    font-size: 24px;
    font-family: 'Courier New', monospace;
}

/* Touch feedback */
@media (hover: none) and (pointer: coarse) {
    #gameCanvas {
        touch-action: none;
    }
}

/* Ensure canvas maintains aspect ratio on resize */
@media screen and (max-width: 1280px) {
    #game-container {
        padding: 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #gameCanvas {
        border: 2px solid white;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Feedback Section */
.feedback-section {
    background-color: #f5f0e6;
    padding: 40px 20px 60px;
    text-align: center;
}

.feedback-section h2 {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    color: #2a2a2a;
    margin-bottom: 12px;
}

.feedback-section p {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #444;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.feedback-form {
    max-width: 500px;
    margin: 0 auto;
}

.feedback-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 2px solid #2a2a2a;
    border-radius: 4px;
    background-color: #fff;
    resize: vertical;
    margin-bottom: 16px;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: #d64545;
}

.feedback-form input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 2px solid #2a2a2a;
    border-radius: 4px;
    background-color: #fff;
    margin-bottom: 16px;
}

.feedback-form input[type="email"]:focus {
    outline: none;
    border-color: #d64545;
}

.feedback-form button {
    background-color: #2a2a2a;
    color: #f5f0e6;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.feedback-form button:hover {
    background-color: #d64545;
}

@media screen and (max-width: 600px) {
    .feedback-section {
        padding: 30px 16px 50px;
    }

    .feedback-section h2 {
        font-size: 22px;
    }

    .feedback-section p {
        font-size: 14px;
    }
}
