:root {
    --primary-color: #2c3e50;
    --accent-color: #e67e22;
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f0f0;
}

#canvas-container {
    width: 100%;
    height: 100%;
    display: block;
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    pointer-events: none; /* Let clicks pass through to canvas */
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.back-btn {
    pointer-events: auto;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    text-decoration: none;
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 500;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.info-panel {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 350px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.info-panel h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.info-panel p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.controls {
    pointer-events: auto;
    display: flex;
    gap: 0.5rem;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

button:hover {
    opacity: 0.9;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--primary-color);
    z-index: 5;
}

@media (max-width: 600px) {
    #ui-container {
        padding: 1rem;
    }
    .info-panel {
        max-width: 100%;
    }
}
