body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
    color: #fff;
    font-family: 'Courier New', monospace;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar com controles */
.sidebar {
    width: 300px;
    min-width: 300px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-right: 2px solid #333;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
}

/* Área principal com canvas */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

h1 {
    text-align: center;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 2em;
    line-height: 1.2;
}

.info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 11px;
    opacity: 0.8;
    line-height: 1.4;
}

/* Seção de controles de padrões */
.pattern-controls {
    margin-bottom: 20px;
}

.section-title {
    font-size: 12px;
    color: #4ecdc4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

button {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    color: white;
    padding: 10px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 80px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

button.active {
    background: linear-gradient(45deg, #45b7d1, #96ceb4);
    box-shadow: 0 0 20px rgba(69, 183, 209, 0.5);
}

/* Controles deslizantes */
.parameter-controls {
    margin-bottom: 20px;
}

.sliders {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-group label {
    font-size: 10px;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="range"] {
    width: 100%;
    height: 20px;
    background: #333;
    outline: none;
    border-radius: 10px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Controles de ação */
.action-controls {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.action-controls button {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    font-size: 11px;
}

/* Canvas container */
#canvas-container {
    border: 2px solid #333;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.7);
    position: relative;
    margin: 20px 0;
}

.stats {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    padding: 8px;
    border-radius: 8px;
    font-size: 10px;
    z-index: 100;
}

/* Instruções de uso */
.usage-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 10px;
    border-left: 3px solid #ff6b6b;
}

.usage-info h4 {
    margin: 0 0 8px 0;
    color: #ff6b6b;
    font-size: 11px;
    text-transform: uppercase;
}

.usage-info p {
    margin: 0;
    font-size: 9px;
    line-height: 1.4;
    opacity: 0.9;
}

/* Responsividade */
@media screen and (max-width: 1200px) {
    .sidebar {
        width: 280px;
        min-width: 280px;
    }
    
    h1 {
        font-size: 1.8em;
    }
}

@media screen and (max-width: 900px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 2px solid #333;
        padding: 15px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .controls {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .control-row {
        justify-content: center;
    }
    
    .sliders {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .slider-group {
        flex: 1;
        min-width: 120px;
    }
}

@media screen and (max-width: 600px) {
    #canvas-container canvas {
        max-width: 100%;
        height: auto !important;
    }
}