body {
    background-color: var(--bs-dark);
    color: var(--bs-light);
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
    touch-action: none; /* Prevent default touch behaviors */
}

.game-header {
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(255, 255, 255, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.header-left {
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-left: 10px;
    font-size: 0.8em;
}

.header-right {
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-right: 10px;
    font-size: 0.8em;
    display: flex;
    align-items: center;
}

.game-title {
    margin: 0;
    font-size: clamp(16px, 4vw, 24px);
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
    flex-grow: 1;
    text-align: center;
}

.game-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    min-height: 0; /* Allow container to shrink */
    max-height: calc(100vh - 60px); /* Account for header height */
    overflow: hidden;
}

canvas {
    background: black;
    border: 2px solid var(--bs-secondary);
    width: 100%;
    height: 100%;
    touch-action: none;
    max-height: calc(100vh - 120px); /* Account for header and score display */
}

/* Landing page styles */
#landing-page {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.landing-dorito {
    width: min(80vw, 400px);
    height: auto;
    max-width: 400px;
    animation: float 3s ease-in-out infinite;
}

.mlg-button {
    font-size: clamp(18px, 5vw, 24px);
    font-weight: bold;
    text-transform: uppercase;
    padding: 15px 30px;
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
    border: 3px solid #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    width: min(80vw, 300px);
    white-space: normal;
    margin-top: 20px;
}

.mlg-button:hover,
.mlg-button:active {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
}

/* Game container styles */
#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.score-container {
    text-align: center;
    font-size: clamp(14px, 4vw, 24px);
    padding: 5px;
    z-index: 1000;
}

#score-display {
    font-weight: bold;
}

#high-score {
    font-size: 0.8em;
}

#game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    z-index: 1000;
    width: min(90vw, 400px);
    text-align: center;
}

#game-over h2 {
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.5);
    font-size: clamp(20px, 6vw, 28px);
}

#game-over .final-score {
    font-size: clamp(18px, 5vw, 24px);
    color: #fff;
    margin-bottom: 20px;
}

#game-over button {
    margin: 10px;
    padding: 10px 20px;
    font-size: clamp(16px, 4vw, 18px);
    text-transform: uppercase;
    transition: all 0.3s ease;
    min-width: 150px;
}

#game-over button:hover,
#game-over button:active {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Animations */
@keyframes scorePopup {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .game-header {
        padding: 5px;
    }

    .game-wrapper {
        padding: 5px;
    }

    canvas {
        border-width: 1px;
    }

    .social-link {
        font-size: 0.7em;
    }
}

/* Add these styles for the social link */
.social-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-link:hover {
    color: #1DA1F2;
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(29, 161, 242, 0.7);
}

.social-link i {
    font-size: 1.2em;
}