/* CSS3 Playground Styles */
.css3-playground {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.playground-container {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

/* Controls Panel */
.controls-panel {
    width: 320px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-y: auto;
    max-height: 700px;
}

.controls-panel h3 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
    font-size: 18px;
}

.control-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.control-group:last-child {
    border-bottom: none;
}

.control-label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 10px;
    font-size: 14px;
}

.sub-control {
    margin-bottom: 12px;
}

.sub-control span {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    background: #2980b9;
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.number-input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.color-picker {
    width: 50px;
    height: 30px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.select-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.textarea-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
}

/* Preview Panel */
.preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-container {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    position: relative;
    overflow: hidden;
}

.preview-box {
    width: 300px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.preview-box span {
    font-size: 24px;
    font-weight: 500;
}

/* Output Panel */
.output-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #34495e;
    color: #fff;
}

.output-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.copy-btn {
    padding: 6px 16px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #2980b9;
}

.copy-btn.copied {
    background: #27ae60;
}

.css-output {
    margin: 0;
    padding: 20px;
    background: #2c3e50;
    color: #ecf0f1;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive */
@media (max-width: 768px) {
    .playground-container {
        flex-direction: column;
    }
    
    .controls-panel {
        width: 100%;
        max-height: 400px;
    }
}
