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

body,
html {
    overflow: hidden;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.instructions {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 100%;
    z-index: 10;
    text-align: center;
    padding: 0 20px;
    pointer-events: none;
}

.instructions p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    display: inline-block;
    backdrop-filter: blur(5px);
}

/* Loading and Error States */
#loading,
#error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#error-message {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

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

.loading-text,
#error-details {
    font-size: 18px;
    color: #fff;
    margin: 20px 0;
    max-width: 600px;
    text-align: center;
}

#retry-button {
    background: linear-gradient(45deg, #5a5de8, #00a4e4);
    border: none;
    border-radius: 30px;
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#retry-button:hover {
    transform: scale(1.05);
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .instructions p {
        font-size: 14px;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .spinner {
        width: 40px;
        height: 40px;
    }

    .loading-text {
        font-size: 16px;
    }
}