/* Reusable styles for interactive demos - optimized for embedding in iframes */

@import url('https://fonts.googleapis.com/css2?family=Bree+Serif&display=swap');

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

body {
    font-family: 'Bree Serif', serif;
    background: var(--bg-color, #131517);
    color: var(--text-color, #ffffff);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 800px;
}

h1 {
    font-family: 'Bree Serif', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color, #ffffff);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted, #cccccc);
    font-weight: 400;
}

#canvasContainer {
    background: transparent;
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: none;
    border: none;
    margin-bottom: 2rem;
}

#controls {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 800px;
    width: 100%;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color, #ffffff);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.value-display {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
    color: #ffffff;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

button {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: 'Bree Serif', serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: rgba(255, 255, 255, 0.9);
}

button:active {
    transform: translateY(1px);
}

.legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color, #ffffff);
}

.legend-symbol {
    width: 16px;
    height: 16px;
    border: 2px solid;
}

.instructions {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: inherit;
}

.instructions strong {
    font-weight: 600;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    body {
        padding: 1rem;
    }
    
    #canvasContainer {
        padding: 0.75rem;
    }
    
    #controls {
        padding: 1rem;
    }
    
    .control-group {
        margin-bottom: 1rem;
    }
    
    button {
        width: 100%;
        padding: 0.875rem;
    }
    
    .legend {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .instructions {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}
