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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.controls {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.controls h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
}

.object-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.object-selector label {
    font-weight: 600;
    color: #34495e;
    font-size: 16px;
}

.object-btn {
    padding: 10px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.object-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.object-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.instructions {
    background: rgba(52, 152, 219, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.instructions p {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.instructions p:last-child {
    margin-bottom: 0;
}

.playground-container {
    padding: 20px;
    display: flex;
    justify-content: center;
    background: #f8f9fa;
}

#playground {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
}

#playground:hover {
    border-color: #3498db;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 10px;
    }
    
    .controls {
        padding: 20px;
    }
    
    .controls h2 {
        font-size: 24px;
    }
    
    .object-selector {
        flex-direction: column;
        align-items: center;
    }
    
    #playground {
        width: 100%;
        max-width: 600px;
        height: auto;
    }
    
    .instructions p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .controls {
        padding: 15px;
    }
    
    .controls h2 {
        font-size: 18px;
    }
    
    .object-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .playground-container {
        padding: 10px;
    }
    
    .instructions p {
        font-size: 12px;
        line-height: 1.4;
    }
}

@media (max-width: 360px) {
    .controls {
        padding: 10px;
    }
    
    .controls h2 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .object-selector {
        gap: 10px;
    }
    
    .object-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .playground-container {
        padding: 5px;
    }
    
    #playground {
        width: 100%;
        height: auto;
    }
}

/* Touch-friendly resize handles for mobile */
@media (max-width: 768px) {
    [data-type="resize-handle"] {
        stroke-width: 3px !important;
    }
    
    [data-type="resize-handle"][data-type="circle"] {
        r: 8px !important;
    }
    
    [data-type="resize-handle"][data-type="rect"] {
        width: 16px !important;
        height: 16px !important;
    }
}
