/* Basic CSS Reset and Styling */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Updated background to a light gradient */
    background: linear-gradient(to bottom, #e9e9e9, #ffffff);
    font-family: 'Poppins', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Canvas for the background particle effect */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Canvas for the interactive text, layered on top */
#text-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: grab;
}

#text-canvas:active {
    cursor: grabbing;
}

/* A small loading indicator */
#loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333; /* Darker color for light background */
    font-size: 1.2rem;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* UI Elements */
/* Play Game Button */
.game-trigger {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.game-trigger:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* Game Modal/Overlay */
#game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#game-modal.active {
    opacity: 1;
    pointer-events: all;
}

#game-canvas {
    border: 2px solid #333;
    background: #f0f0f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 90vw;
    max-height: 70vh;
}

.game-ui {
    margin-bottom: 20px;
    text-align: center;
}

.game-ui h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.game-ui p {
    color: #666;
    margin: 0;
}

.close-game {
    margin-top: 20px;
    padding: 10px 20px;
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: background 0.2s;
}

.close-game:hover {
    background: #555;
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    margin-top: 20px;
    gap: 10px;
}

@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: rgba(0,0,0,0.1);
        border: none;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 20px;
    }
}
