* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    overflow: hidden;
    touch-action: none;
    background-color: #1a1a1a;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100dvh; /* Use dynamic viewport height to avoid iOS URL bar issues */
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #2a2a2a;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #09d;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: #000;
    font-size: 24px;
    margin-top: 20px;
}

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 90;
}

#start-screen h1 {
    color: white;
    font-size: 48px;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #09d;
}

#start-button {
    padding: 15px 40px;
    font-size: 24px;
    background-color: #09d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 153, 221, 0.5);
    transition: all 0.3s;
}

#start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 153, 221, 0.7);
}

/* New SEO-friendly content styles */
#start-screen h2 {
    color: white;
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 8px rgba(0, 153, 221, 0.8);
}

.location-info {
    color: #09d;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.contact-info {
    margin-top: 40px;
    text-align: center;
}

.contact-logo {
    display: inline-block;
    margin: 0 25px;
    text-decoration: none;
    transition: transform 0.3s;
    opacity: 0.9;
}

.contact-logo:hover {
    transform: scale(1.1);
    opacity: 1;
}

.contact-logo svg {
    display: block;
    width: 28px;
    height: 28px;
}

/* Footer Styles */
#game-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    z-index: 80;
    padding: 20px 0;
    display: none; /* Hidden by default, show when needed */
}

#game-footer.show {
    display: block;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.business-info h3 {
    color: #09d;
    font-size: 24px;
    margin-bottom: 15px;
}

.business-info p {
    margin: 8px 0;
    font-size: 14px;
}

.services h4 {
    color: #09d;
    font-size: 18px;
    margin-bottom: 15px;
}

.services ul {
    list-style: none;
    padding: 0;
}

.services li {
    margin: 8px 0;
    font-size: 14px;
}

.about-padel h4 {
    color: #09d;
    font-size: 18px;
    margin-bottom: 15px;
}

.about-padel p {
    font-size: 14px;
    line-height: 1.4;
}

.footer-bottom {
    text-align: center;
    padding: 15px 20px 0;
    border-top: 1px solid #333;
    margin-top: 20px;
}

.footer-bottom p {
    font-size: 12px;
    color: #999;
}

.footer-bottom a {
    color: #09d;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #start-screen h1 {
        font-size: 36px;
    }
    
    #start-screen h2 {
        font-size: 20px;
    }
    
    .location-info {
        font-size: 16px;
    }
    
    .contact-info p {
        font-size: 14px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
}

.instructions {
    color: white;
    margin-top: 30px;
    text-align: center;
    line-height: 1.5;
}

#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: none; /* Initially hidden, will be shown when game starts */
    justify-content: space-between;
    align-items: center;
    z-index: 80;
}

#book-button.show {
    display: block;
}

#book-button {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: 5%;
    left: auto;
    width: 42.5%;
    padding: 15px 16px;
    font-size: 20px;
    background-color: #09d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 95;
    box-shadow: 0 2px 10px rgba(0, 153, 221, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: none; /* hidden until game starts */
    pointer-events: auto;
    text-transform: uppercase;
}

#redeem-button {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    left: 5%;
    right: auto;
    width: 42.5%;
    padding: 15px 16px;
    font-size: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 95;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: none; /* hidden until game starts */
    pointer-events: auto;
    text-transform: uppercase;
}

#book-button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 153, 221, 0.45);
}

#redeem-button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.45);
}

@media (max-width: 400px) {
    #book-button, #redeem-button {
        width: 44%;
        font-size: 18px;
        padding: 12px 12px;
    }
}

#scoreboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
}

.score-label {
    font-size: 12px;
    opacity: 0.8;
}

.score-value {
    font-size: 20px;
    font-weight: 600;
}

.score-info {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: #09d;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 22px;
}

#info-toast {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    max-width: 80vw;
    text-align: center;
    z-index: 96;
    display: none;
}

#pause-button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
    align-self: flex-start;
}

/* For mobile devices in landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    #start-screen h1 {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    #start-button {
        padding: 10px 30px;
        font-size: 20px;
    }
    
    .instructions {
        font-size: 14px;
    }
}
